Skip to content
Snippets Groups Projects
Commit 55a390b6 authored by Matthewit Dechatech's avatar Matthewit Dechatech
Browse files

Null checks

parent 049311e8
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -515,7 +515,7 @@ Transform:
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 151248}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 63.78, y: -0.77, z: 0}
m_LocalPosition: {x: 60.8, y: 6.76, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children:
- {fileID: 481582}
Loading
Loading
@@ -973,22 +973,22 @@ MonoBehaviour:
m_Calls: []
m_TypeName: UnityEngine.Events.UnityEvent, UnityEngine, Version=0.0.0.0, Culture=neutral,
PublicKeyToken=null
OnAdd:
OnAvailable:
m_PersistentCalls:
m_Calls: []
m_TypeName: UnityEngine.Events.UnityEvent, UnityEngine, Version=0.0.0.0, Culture=neutral,
PublicKeyToken=null
OnRemove:
OnUnavailable:
m_PersistentCalls:
m_Calls: []
m_TypeName: UnityEngine.Events.UnityEvent, UnityEngine, Version=0.0.0.0, Culture=neutral,
PublicKeyToken=null
OnAvailable:
OnAdd:
m_PersistentCalls:
m_Calls: []
m_TypeName: UnityEngine.Events.UnityEvent, UnityEngine, Version=0.0.0.0, Culture=neutral,
PublicKeyToken=null
OnUnavailable:
OnRemove:
m_PersistentCalls:
m_Calls: []
m_TypeName: UnityEngine.Events.UnityEvent, UnityEngine, Version=0.0.0.0, Culture=neutral,
Loading
Loading
@@ -997,8 +997,8 @@ MonoBehaviour:
ActiveBool: Ducking
AvailableBool:
Muted: 0
ActiveEnterSound: {fileID: 0}
ActiveExitSound: {fileID: 0}
PerformSound: {fileID: 0}
EndSound: {fileID: 0}
ActivateAxis: Vertical
RequireNegative: 1
MaxActivateSpeed: 0.61875
Loading
Loading
@@ -1055,22 +1055,22 @@ MonoBehaviour:
m_Calls: []
m_TypeName: UnityEngine.Events.UnityEvent, UnityEngine, Version=0.0.0.0, Culture=neutral,
PublicKeyToken=null
OnAdd:
OnAvailable:
m_PersistentCalls:
m_Calls: []
m_TypeName: UnityEngine.Events.UnityEvent, UnityEngine, Version=0.0.0.0, Culture=neutral,
PublicKeyToken=null
OnRemove:
OnUnavailable:
m_PersistentCalls:
m_Calls: []
m_TypeName: UnityEngine.Events.UnityEvent, UnityEngine, Version=0.0.0.0, Culture=neutral,
PublicKeyToken=null
OnAvailable:
OnAdd:
m_PersistentCalls:
m_Calls: []
m_TypeName: UnityEngine.Events.UnityEvent, UnityEngine, Version=0.0.0.0, Culture=neutral,
PublicKeyToken=null
OnUnavailable:
OnRemove:
m_PersistentCalls:
m_Calls: []
m_TypeName: UnityEngine.Events.UnityEvent, UnityEngine, Version=0.0.0.0, Culture=neutral,
Loading
Loading
@@ -1079,8 +1079,8 @@ MonoBehaviour:
ActiveBool: Rolling
AvailableBool:
Muted: 0
ActiveEnterSound: {fileID: 8300000, guid: bb2cba8fd62577148972c89bd49ef141, type: 3}
ActiveExitSound: {fileID: 0}
PerformSound: {fileID: 8300000, guid: bb2cba8fd62577148972c89bd49ef141, type: 3}
EndSound: {fileID: 0}
ActivateAxis: Vertical
RequireNegative: 1
MinActivateSpeed: 0.61875
Loading
Loading
@@ -1138,22 +1138,22 @@ MonoBehaviour:
m_Calls: []
m_TypeName: UnityEngine.Events.UnityEvent, UnityEngine, Version=0.0.0.0, Culture=neutral,
PublicKeyToken=null
OnAdd:
OnAvailable:
m_PersistentCalls:
m_Calls: []
m_TypeName: UnityEngine.Events.UnityEvent, UnityEngine, Version=0.0.0.0, Culture=neutral,
PublicKeyToken=null
OnRemove:
OnUnavailable:
m_PersistentCalls:
m_Calls: []
m_TypeName: UnityEngine.Events.UnityEvent, UnityEngine, Version=0.0.0.0, Culture=neutral,
PublicKeyToken=null
OnAvailable:
OnAdd:
m_PersistentCalls:
m_Calls: []
m_TypeName: UnityEngine.Events.UnityEvent, UnityEngine, Version=0.0.0.0, Culture=neutral,
PublicKeyToken=null
OnUnavailable:
OnRemove:
m_PersistentCalls:
m_Calls: []
m_TypeName: UnityEngine.Events.UnityEvent, UnityEngine, Version=0.0.0.0, Culture=neutral,
Loading
Loading
@@ -1162,8 +1162,8 @@ MonoBehaviour:
ActiveBool: Balancing
AvailableBool:
Muted: 0
ActiveEnterSound: {fileID: 0}
ActiveExitSound: {fileID: 0}
PerformSound: {fileID: 0}
EndSound: {fileID: 0}
MaxDistance: 0.1
AllowDuck: 1
AllowLookUp: 0
Loading
Loading
@@ -1196,22 +1196,22 @@ MonoBehaviour:
m_Calls: []
m_TypeName: UnityEngine.Events.UnityEvent, UnityEngine, Version=0.0.0.0, Culture=neutral,
PublicKeyToken=null
OnAdd:
OnAvailable:
m_PersistentCalls:
m_Calls: []
m_TypeName: UnityEngine.Events.UnityEvent, UnityEngine, Version=0.0.0.0, Culture=neutral,
PublicKeyToken=null
OnRemove:
OnUnavailable:
m_PersistentCalls:
m_Calls: []
m_TypeName: UnityEngine.Events.UnityEvent, UnityEngine, Version=0.0.0.0, Culture=neutral,
PublicKeyToken=null
OnAvailable:
OnAdd:
m_PersistentCalls:
m_Calls: []
m_TypeName: UnityEngine.Events.UnityEvent, UnityEngine, Version=0.0.0.0, Culture=neutral,
PublicKeyToken=null
OnUnavailable:
OnRemove:
m_PersistentCalls:
m_Calls: []
m_TypeName: UnityEngine.Events.UnityEvent, UnityEngine, Version=0.0.0.0, Culture=neutral,
Loading
Loading
@@ -1220,8 +1220,8 @@ MonoBehaviour:
ActiveBool: Dying
AvailableBool:
Muted: 0
ActiveEnterSound: {fileID: 0}
ActiveExitSound: {fileID: 0}
PerformSound: {fileID: 0}
EndSound: {fileID: 0}
Velocity: 4.2
RestartDelay: 2.333333
RestartTimer: 0
Loading
Loading
@@ -1265,22 +1265,22 @@ MonoBehaviour:
m_Calls: []
m_TypeName: UnityEngine.Events.UnityEvent, UnityEngine, Version=0.0.0.0, Culture=neutral,
PublicKeyToken=null
OnAdd:
OnAvailable:
m_PersistentCalls:
m_Calls: []
m_TypeName: UnityEngine.Events.UnityEvent, UnityEngine, Version=0.0.0.0, Culture=neutral,
PublicKeyToken=null
OnRemove:
OnUnavailable:
m_PersistentCalls:
m_Calls: []
m_TypeName: UnityEngine.Events.UnityEvent, UnityEngine, Version=0.0.0.0, Culture=neutral,
PublicKeyToken=null
OnAvailable:
OnAdd:
m_PersistentCalls:
m_Calls: []
m_TypeName: UnityEngine.Events.UnityEvent, UnityEngine, Version=0.0.0.0, Culture=neutral,
PublicKeyToken=null
OnUnavailable:
OnRemove:
m_PersistentCalls:
m_Calls: []
m_TypeName: UnityEngine.Events.UnityEvent, UnityEngine, Version=0.0.0.0, Culture=neutral,
Loading
Loading
@@ -1289,8 +1289,8 @@ MonoBehaviour:
ActiveBool:
AvailableBool:
Muted: 0
ActiveEnterSound: {fileID: 0}
ActiveExitSound: {fileID: 0}
PerformSound: {fileID: 0}
EndSound: {fileID: 0}
Used: 0
Health: {fileID: 11479486}
SizeChange: {x: 0.24, y: 0.24}
Loading
Loading
@@ -1385,22 +1385,22 @@ MonoBehaviour:
m_Calls: []
m_TypeName: UnityEngine.Events.UnityEvent, UnityEngine, Version=0.0.0.0, Culture=neutral,
PublicKeyToken=null
OnAdd:
OnAvailable:
m_PersistentCalls:
m_Calls: []
m_TypeName: UnityEngine.Events.UnityEvent, UnityEngine, Version=0.0.0.0, Culture=neutral,
PublicKeyToken=null
OnRemove:
OnUnavailable:
m_PersistentCalls:
m_Calls: []
m_TypeName: UnityEngine.Events.UnityEvent, UnityEngine, Version=0.0.0.0, Culture=neutral,
PublicKeyToken=null
OnAvailable:
OnAdd:
m_PersistentCalls:
m_Calls: []
m_TypeName: UnityEngine.Events.UnityEvent, UnityEngine, Version=0.0.0.0, Culture=neutral,
PublicKeyToken=null
OnUnavailable:
OnRemove:
m_PersistentCalls:
m_Calls: []
m_TypeName: UnityEngine.Events.UnityEvent, UnityEngine, Version=0.0.0.0, Culture=neutral,
Loading
Loading
@@ -1409,8 +1409,8 @@ MonoBehaviour:
ActiveBool: Hurt
AvailableBool:
Muted: 0
ActiveEnterSound: {fileID: 0}
ActiveExitSound: {fileID: 0}
PerformSound: {fileID: 0}
EndSound: {fileID: 0}
ReboundSpeed: {x: 1.2, y: 2.4}
UnderwaterReboundSpeed: {x: 1.2, y: 0.8}
--- !u!114 &11472608
Loading
Loading
@@ -1440,22 +1440,22 @@ MonoBehaviour:
m_Calls: []
m_TypeName: UnityEngine.Events.UnityEvent, UnityEngine, Version=0.0.0.0, Culture=neutral,
PublicKeyToken=null
OnAdd:
OnAvailable:
m_PersistentCalls:
m_Calls: []
m_TypeName: UnityEngine.Events.UnityEvent, UnityEngine, Version=0.0.0.0, Culture=neutral,
PublicKeyToken=null
OnRemove:
OnUnavailable:
m_PersistentCalls:
m_Calls: []
m_TypeName: UnityEngine.Events.UnityEvent, UnityEngine, Version=0.0.0.0, Culture=neutral,
PublicKeyToken=null
OnAvailable:
OnAdd:
m_PersistentCalls:
m_Calls: []
m_TypeName: UnityEngine.Events.UnityEvent, UnityEngine, Version=0.0.0.0, Culture=neutral,
PublicKeyToken=null
OnUnavailable:
OnRemove:
m_PersistentCalls:
m_Calls: []
m_TypeName: UnityEngine.Events.UnityEvent, UnityEngine, Version=0.0.0.0, Culture=neutral,
Loading
Loading
@@ -1464,8 +1464,8 @@ MonoBehaviour:
ActiveBool: Jumping
AvailableBool:
Muted: 0
ActiveEnterSound: {fileID: 8300000, guid: d9c2e238883004e4b9f25586a51abc28, type: 3}
ActiveExitSound: {fileID: 0}
PerformSound: {fileID: 8300000, guid: d9c2e238883004e4b9f25586a51abc28, type: 3}
EndSound: {fileID: 0}
ActivateButton: Jump
ClearanceHeight: 0.25
ActivateSpeed: 3.9
Loading
Loading
@@ -1509,22 +1509,22 @@ MonoBehaviour:
m_Calls: []
m_TypeName: UnityEngine.Events.UnityEvent, UnityEngine, Version=0.0.0.0, Culture=neutral,
PublicKeyToken=null
OnAdd:
OnAvailable:
m_PersistentCalls:
m_Calls: []
m_TypeName: UnityEngine.Events.UnityEvent, UnityEngine, Version=0.0.0.0, Culture=neutral,
PublicKeyToken=null
OnRemove:
OnUnavailable:
m_PersistentCalls:
m_Calls: []
m_TypeName: UnityEngine.Events.UnityEvent, UnityEngine, Version=0.0.0.0, Culture=neutral,
PublicKeyToken=null
OnAvailable:
OnAdd:
m_PersistentCalls:
m_Calls: []
m_TypeName: UnityEngine.Events.UnityEvent, UnityEngine, Version=0.0.0.0, Culture=neutral,
PublicKeyToken=null
OnUnavailable:
OnRemove:
m_PersistentCalls:
m_Calls: []
m_TypeName: UnityEngine.Events.UnityEvent, UnityEngine, Version=0.0.0.0, Culture=neutral,
Loading
Loading
@@ -1533,8 +1533,8 @@ MonoBehaviour:
ActiveBool: Looking Up
AvailableBool:
Muted: 0
ActiveEnterSound: {fileID: 0}
ActiveExitSound: {fileID: 0}
PerformSound: {fileID: 0}
EndSound: {fileID: 0}
ActivateAxis: Vertical
--- !u!114 &11479486
MonoBehaviour:
Loading
Loading
@@ -1627,22 +1627,22 @@ MonoBehaviour:
m_Calls: []
m_TypeName: UnityEngine.Events.UnityEvent, UnityEngine, Version=0.0.0.0, Culture=neutral,
PublicKeyToken=null
OnAdd:
OnAvailable:
m_PersistentCalls:
m_Calls: []
m_TypeName: UnityEngine.Events.UnityEvent, UnityEngine, Version=0.0.0.0, Culture=neutral,
PublicKeyToken=null
OnRemove:
OnUnavailable:
m_PersistentCalls:
m_Calls: []
m_TypeName: UnityEngine.Events.UnityEvent, UnityEngine, Version=0.0.0.0, Culture=neutral,
PublicKeyToken=null
OnAvailable:
OnAdd:
m_PersistentCalls:
m_Calls: []
m_TypeName: UnityEngine.Events.UnityEvent, UnityEngine, Version=0.0.0.0, Culture=neutral,
PublicKeyToken=null
OnUnavailable:
OnRemove:
m_PersistentCalls:
m_Calls: []
m_TypeName: UnityEngine.Events.UnityEvent, UnityEngine, Version=0.0.0.0, Culture=neutral,
Loading
Loading
@@ -1651,8 +1651,8 @@ MonoBehaviour:
ActiveBool:
AvailableBool:
Muted: 0
ActiveEnterSound: {fileID: 0}
ActiveExitSound: {fileID: 0}
PerformSound: {fileID: 0}
EndSound: {fileID: 0}
InputAxisFloat:
InputBool:
AcceleratingBool: Accelerating
Loading
Loading
@@ -1695,22 +1695,22 @@ MonoBehaviour:
m_Calls: []
m_TypeName: UnityEngine.Events.UnityEvent, UnityEngine, Version=0.0.0.0, Culture=neutral,
PublicKeyToken=null
OnAdd:
OnAvailable:
m_PersistentCalls:
m_Calls: []
m_TypeName: UnityEngine.Events.UnityEvent, UnityEngine, Version=0.0.0.0, Culture=neutral,
PublicKeyToken=null
OnRemove:
OnUnavailable:
m_PersistentCalls:
m_Calls: []
m_TypeName: UnityEngine.Events.UnityEvent, UnityEngine, Version=0.0.0.0, Culture=neutral,
PublicKeyToken=null
OnAvailable:
OnAdd:
m_PersistentCalls:
m_Calls: []
m_TypeName: UnityEngine.Events.UnityEvent, UnityEngine, Version=0.0.0.0, Culture=neutral,
PublicKeyToken=null
OnUnavailable:
OnRemove:
m_PersistentCalls:
m_Calls: []
m_TypeName: UnityEngine.Events.UnityEvent, UnityEngine, Version=0.0.0.0, Culture=neutral,
Loading
Loading
@@ -1719,8 +1719,8 @@ MonoBehaviour:
ActiveBool: Pushing
AvailableBool:
Muted: 0
ActiveEnterSound: {fileID: 0}
ActiveExitSound: {fileID: 0}
PerformSound: {fileID: 0}
EndSound: {fileID: 0}
ActivateAxis:
UseControlInput: 1
--- !u!114 &11492328
Loading
Loading
@@ -1772,22 +1772,22 @@ MonoBehaviour:
m_Calls: []
m_TypeName: UnityEngine.Events.UnityEvent, UnityEngine, Version=0.0.0.0, Culture=neutral,
PublicKeyToken=null
OnAdd:
OnAvailable:
m_PersistentCalls:
m_Calls: []
m_TypeName: UnityEngine.Events.UnityEvent, UnityEngine, Version=0.0.0.0, Culture=neutral,
PublicKeyToken=null
OnRemove:
OnUnavailable:
m_PersistentCalls:
m_Calls: []
m_TypeName: UnityEngine.Events.UnityEvent, UnityEngine, Version=0.0.0.0, Culture=neutral,
PublicKeyToken=null
OnAvailable:
OnAdd:
m_PersistentCalls:
m_Calls: []
m_TypeName: UnityEngine.Events.UnityEvent, UnityEngine, Version=0.0.0.0, Culture=neutral,
PublicKeyToken=null
OnUnavailable:
OnRemove:
m_PersistentCalls:
m_Calls: []
m_TypeName: UnityEngine.Events.UnityEvent, UnityEngine, Version=0.0.0.0, Culture=neutral,
Loading
Loading
@@ -1796,8 +1796,8 @@ MonoBehaviour:
ActiveBool: Spindashing
AvailableBool:
Muted: 0
ActiveEnterSound: {fileID: 0}
ActiveExitSound: {fileID: 0}
PerformSound: {fileID: 0}
EndSound: {fileID: 8300000, guid: bab5237725114cc448e6e39ad6a5c6b2, type: 3}
ChargeButton: Jump
BasePower: 4.8
ChargePower: 0.6
Loading
Loading
@@ -1835,22 +1835,22 @@ MonoBehaviour:
m_Calls: []
m_TypeName: UnityEngine.Events.UnityEvent, UnityEngine, Version=0.0.0.0, Culture=neutral,
PublicKeyToken=null
OnAdd:
OnAvailable:
m_PersistentCalls:
m_Calls: []
m_TypeName: UnityEngine.Events.UnityEvent, UnityEngine, Version=0.0.0.0, Culture=neutral,
PublicKeyToken=null
OnRemove:
OnUnavailable:
m_PersistentCalls:
m_Calls: []
m_TypeName: UnityEngine.Events.UnityEvent, UnityEngine, Version=0.0.0.0, Culture=neutral,
PublicKeyToken=null
OnAvailable:
OnAdd:
m_PersistentCalls:
m_Calls: []
m_TypeName: UnityEngine.Events.UnityEvent, UnityEngine, Version=0.0.0.0, Culture=neutral,
PublicKeyToken=null
OnUnavailable:
OnRemove:
m_PersistentCalls:
m_Calls: []
m_TypeName: UnityEngine.Events.UnityEvent, UnityEngine, Version=0.0.0.0, Culture=neutral,
Loading
Loading
@@ -1859,8 +1859,8 @@ MonoBehaviour:
ActiveBool:
AvailableBool:
Muted: 0
ActiveEnterSound: {fileID: 0}
ActiveExitSound: {fileID: 0}
PerformSound: {fileID: 0}
EndSound: {fileID: 0}
MovementAxis: Horizontal
InvertAxis: 0
Acceleration: 3.375
Loading
Loading
Loading
Loading
@@ -395,7 +395,8 @@ public bool Underwater
public bool ForceSurfaceAngle;
 
/// <summary>
/// If grounded, the angle of incline the controller is walking on
/// If grounded, the angle's surface relative to the direction of gravity. If gravity points down, this is
/// the same as SurfaceAngle.
/// </summary>
public float RelativeSurfaceAngle
{
Loading
Loading
Loading
Loading
@@ -101,7 +101,7 @@ public void Update()
{
var rotateToSensors = true;
rotateToSensors &= RotateDuringStand || !DMath.Equalsf(Controller.GroundVelocity);
rotateToSensors &= RotateDuringRoll || !Roll.Active;
rotateToSensors &= Roll == null || RotateDuringRoll || !Roll.Active;
rotateToSensors &=
Mathf.Abs(DMath.ShortestArc_d(Controller.SensorsRotation, Controller.GravityRight)) >
MinimumAngle;
Loading
Loading
@@ -111,7 +111,7 @@ public void Update()
else
{
if ((RotateDuringStand || !DMath.Equalsf(Controller.GroundVelocity)) &&
(RotateDuringRoll || !Roll.Active))
(Roll == null || RotateDuringRoll || !Roll.Active))
{
var difference = DMath.ShortestArc_d(Rotation, Controller.GravityRight);
difference = difference > 0.0f
Loading
Loading
Loading
Loading
@@ -40,6 +40,11 @@ public override void Reset()
RequireNegative = true;
}
 
public override void OnManagerAdd()
{
GroundControl = Manager.GetMove<GroundControl>();
}
public override bool Available
{
get
Loading
Loading
@@ -65,5 +70,15 @@ public override bool ShouldEnd
{
get { return !Input.GetButton(ActivateAxis) || !Available; }
}
public override void OnActiveEnter()
{
GroundControl.ControlLocked = true;
}
public override void OnActiveExit()
{
GroundControl.ControlLocked = false;
}
}
}
Loading
Loading
@@ -87,7 +87,7 @@ public void Awake()
OnUnavailable = OnUnavailable ?? new MoveEvent();
OnAdd = OnAdd ?? new MoveEvent();
OnRemove = OnRemove ?? new MoveEvent();
Moves = Moves ?? new List<Move>();
Moves = GetComponentsInChildren<Move>().ToList();
_moves = new List<Move>();
}
 
Loading
Loading
Loading
Loading
@@ -119,9 +119,6 @@ public virtual void Start()
return;
#endif
 
var collider2D = GetComponent<Collider2D>();
collider2D.isTrigger = true;
if (!TriggerFromChildren)
return;
 
Loading
Loading
@@ -254,11 +251,8 @@ public void OnTriggerStay2D(Collider2D collider2D)
var hitbox = collider2D.GetComponent<Hitbox>();
if (hitbox.AllowCollision(this))
{
if (!HasController(hitbox.Source))
{
NotifyCollision(hitbox.Source, transform);
BubbleEvent(hitbox.Source, transform);
}
NotifyCollision(hitbox.Source, transform);
BubbleEvent(hitbox.Source, transform);
}
else
{
Loading
Loading
Loading
Loading
@@ -96,19 +96,6 @@ public void Awake()
JingleSource.spatialBlend = 0.0f;
}
 
public void Start()
{
if (Instance == null)
{
Instance = this;
if (MainBGM != null) PlayBGM(MainBGM);
return;
}
Debug.LogError("Can only have one SoundManager per scene!");
Destroy(gameObject);
}
public void Update()
{
if (CurrentBGMState == BGMState.BGM) return;
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment