diff --git a/Assets/Scenes/PatScene.unity b/Assets/Scenes/PatScene.unity index 4e8c631..8ab48f9 100644 Binary files a/Assets/Scenes/PatScene.unity and b/Assets/Scenes/PatScene.unity differ diff --git a/Assets/Scripts/Child.cs b/Assets/Scripts/Child.cs index 15c4a9b..00b4420 100644 --- a/Assets/Scripts/Child.cs +++ b/Assets/Scripts/Child.cs @@ -15,6 +15,15 @@ public class Child : MonoBehaviour private float _zValue; private bool _isSleeping; + private int _index; + + public int Index + { + get { return _index; } + set { _index = value; } + } + + public bool IsSleeping { get { return _isSleeping; } @@ -28,8 +37,6 @@ public class Child : MonoBehaviour void Update() { _isGrounded = IsGrounded(); - - Debug.Log(_isGrounded); } void OnTriggerEnter(Collider other) { diff --git a/Assets/Scripts/ChildController.cs b/Assets/Scripts/ChildController.cs index 647b000..38849ba 100644 --- a/Assets/Scripts/ChildController.cs +++ b/Assets/Scripts/ChildController.cs @@ -18,6 +18,7 @@ public class ChildController : MonoBehaviour InputManager.Instance.AddCallback((int)PlayerNumber, HandlePlayerButtons); _child = GetComponent(); + _child.Index = (int)PlayerNumber; } private void HandlePlayerAxis(MappedInput input) diff --git a/Assets/Scripts/MomBehavior.cs b/Assets/Scripts/MomBehavior.cs index b05b7b4..4c681b7 100644 --- a/Assets/Scripts/MomBehavior.cs +++ b/Assets/Scripts/MomBehavior.cs @@ -36,6 +36,16 @@ public class MomBehavior : MonoBehaviour WarningText.gameObject.SetActive(false); _nextTriggerTime = GetNextTriggerTime(); + foreach (Child child in Children) + { + if (!child.IsSleeping) + { + // TODO: Do something (end the game? kill the player? make him lose 1 life? etc.) + + Debug.Log("Child " + child.Index + " got found by Mommy."); + } + } + _elapsedTime = 0f; } }