Skip to content

Commit 48ad8ea

Browse files
Updated master branch from 'v.0.1.2.0-alpha' to 'v.0.1.3.0-alpha'
2 parents e30660f + 444be3f commit 48ad8ea

19 files changed

Lines changed: 1149 additions & 415 deletions

ModAPI.sln

Lines changed: 23 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -5,27 +5,34 @@ VisualStudioVersion = 16.0.28407.52
55
MinimumVisualStudioVersion = 10.0.40219.1
66
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ModAPI", "ModAPI\ModAPI.csproj", "{65DDDAC8-54EA-4116-A53D-05B126FD5A49}"
77
EndProject
8-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Secure Car Jack", "..\Secure Car Jack\Secure Car Jack.csproj", "{310E0B49-FB86-4ACB-B5F7-B415CE36798E}"
8+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ModApiInterface", "ModApiInterface\ModApiInterface.csproj", "{59C5939B-FA7D-4A62-9778-9653502CBB35}"
9+
ProjectSection(ProjectDependencies) = postProject
10+
{65DDDAC8-54EA-4116-A53D-05B126FD5A49} = {65DDDAC8-54EA-4116-A53D-05B126FD5A49}
11+
EndProjectSection
912
EndProject
1013
Global
1114
GlobalSection(SolutionConfigurationPlatforms) = preSolution
12-
AnyCPU|Any CPU = AnyCPU|Any CPU
13-
Debug|Any CPU = Debug|Any CPU
14-
Release|Any CPU = Release|Any CPU
15+
Debug|x64 = Debug|x64
16+
Debug|x86 = Debug|x86
17+
Release|x64 = Release|x64
18+
Release|x86 = Release|x86
1519
EndGlobalSection
1620
GlobalSection(ProjectConfigurationPlatforms) = postSolution
17-
{65DDDAC8-54EA-4116-A53D-05B126FD5A49}.AnyCPU|Any CPU.ActiveCfg = Release|Any CPU
18-
{65DDDAC8-54EA-4116-A53D-05B126FD5A49}.AnyCPU|Any CPU.Build.0 = Release|Any CPU
19-
{65DDDAC8-54EA-4116-A53D-05B126FD5A49}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
20-
{65DDDAC8-54EA-4116-A53D-05B126FD5A49}.Debug|Any CPU.Build.0 = Debug|Any CPU
21-
{65DDDAC8-54EA-4116-A53D-05B126FD5A49}.Release|Any CPU.ActiveCfg = Release|Any CPU
22-
{65DDDAC8-54EA-4116-A53D-05B126FD5A49}.Release|Any CPU.Build.0 = Release|Any CPU
23-
{310E0B49-FB86-4ACB-B5F7-B415CE36798E}.AnyCPU|Any CPU.ActiveCfg = Release|Any CPU
24-
{310E0B49-FB86-4ACB-B5F7-B415CE36798E}.AnyCPU|Any CPU.Build.0 = Release|Any CPU
25-
{310E0B49-FB86-4ACB-B5F7-B415CE36798E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
26-
{310E0B49-FB86-4ACB-B5F7-B415CE36798E}.Debug|Any CPU.Build.0 = Debug|Any CPU
27-
{310E0B49-FB86-4ACB-B5F7-B415CE36798E}.Release|Any CPU.ActiveCfg = Release|Any CPU
28-
{310E0B49-FB86-4ACB-B5F7-B415CE36798E}.Release|Any CPU.Build.0 = Release|Any CPU
21+
{65DDDAC8-54EA-4116-A53D-05B126FD5A49}.Debug|x64.ActiveCfg = Debug|x64
22+
{65DDDAC8-54EA-4116-A53D-05B126FD5A49}.Debug|x64.Build.0 = Debug|x64
23+
{65DDDAC8-54EA-4116-A53D-05B126FD5A49}.Debug|x86.ActiveCfg = Debug|x86
24+
{65DDDAC8-54EA-4116-A53D-05B126FD5A49}.Debug|x86.Build.0 = Debug|x86
25+
{65DDDAC8-54EA-4116-A53D-05B126FD5A49}.Release|x64.ActiveCfg = Release|x64
26+
{65DDDAC8-54EA-4116-A53D-05B126FD5A49}.Release|x64.Build.0 = Release|x64
27+
{65DDDAC8-54EA-4116-A53D-05B126FD5A49}.Release|x86.ActiveCfg = Release|x86
28+
{65DDDAC8-54EA-4116-A53D-05B126FD5A49}.Release|x86.Build.0 = Release|x86
29+
{59C5939B-FA7D-4A62-9778-9653502CBB35}.Debug|x64.ActiveCfg = Debug|x64
30+
{59C5939B-FA7D-4A62-9778-9653502CBB35}.Debug|x64.Build.0 = Debug|x64
31+
{59C5939B-FA7D-4A62-9778-9653502CBB35}.Debug|x86.ActiveCfg = Debug|x86
32+
{59C5939B-FA7D-4A62-9778-9653502CBB35}.Debug|x86.Build.0 = Debug|x86
33+
{59C5939B-FA7D-4A62-9778-9653502CBB35}.Release|x64.ActiveCfg = Release|x64
34+
{59C5939B-FA7D-4A62-9778-9653502CBB35}.Release|x86.ActiveCfg = Release|x86
35+
{59C5939B-FA7D-4A62-9778-9653502CBB35}.Release|x86.Build.0 = Release|x86
2936
EndGlobalSection
3037
GlobalSection(SolutionProperties) = preSolution
3138
HideSolutionNode = FALSE

ModAPI/Attachable/Active.cs

Lines changed: 0 additions & 12 deletions
This file was deleted.

ModAPI/Attachable/CallBacks/TriggerCallBack.cs

Lines changed: 22 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
using System;
22
using UnityEngine;
33

4-
namespace ModApi.Attachable.CallBacks
4+
namespace TommoJProductions.ModApi.v0_1_3_0_alpha.Attachable.CallBacks
55
{
66
/// <summary>
77
/// Represents call back for triggers.
@@ -15,24 +15,38 @@ public class TriggerCallback : MonoBehaviour
1515
/// <summary>
1616
/// Represents the on trigger exit event.
1717
/// </summary>
18-
public Action<Collider> onTriggerExit;
18+
public event Action<Collider, TriggerCallback> onTriggerExit;
1919
/// <summary>
2020
/// Represents the on trigger stay event.
2121
/// </summary>
22-
public Action<Collider> onTriggerStay;
23-
22+
public event Action<Collider, TriggerCallback> onTriggerStay;
23+
/// <summary>
24+
/// Represents the on trigger enter event.
25+
/// </summary>
26+
public event Action<Collider, TriggerCallback> onTriggerEnter;
27+
/// <summary>
28+
/// Represents the collider that invoked this callback.
29+
/// </summary>
30+
public Collider callbackCollider { get; private set; }
2431
#endregion
2532

26-
#region Methods
33+
#region Unity runtime methods
2734

35+
private void Awake()
36+
{
37+
callbackCollider = GetComponent<Collider>();
38+
}
2839
private void OnTriggerExit(Collider collider)
2940
{
30-
this.onTriggerExit(collider);
41+
onTriggerExit?.Invoke(collider, this);
3142
}
32-
3343
private void OnTriggerStay(Collider collider)
3444
{
35-
this.onTriggerStay(collider);
45+
onTriggerStay?.Invoke(collider, this);
46+
}
47+
private void OnTriggerEnter(Collider collider)
48+
{
49+
onTriggerEnter?.Invoke(collider, this);
3650
}
3751

3852
#endregion

0 commit comments

Comments
 (0)