void Start() { if (null == boxClosed) { Debug.LogError("BoxClosed game object not attached to BoxClosing!"); } if (null == cutie) { Debug.LogError("Cutie game object not attached to BoxClosing!"); } else { jumpUp = cutie.GetComponent <JumpUp>(); if (null == jumpUp) { Debug.LogError("BoxClosing could not find JumpUp on Cutie object!"); } } }
void Start() { highestTier = tierWeights.Length - 1; if (null == boxOpen) { Debug.LogError("BoxOpen game object not attached to BoxOpening!"); } if (null == cutie) { Debug.LogError("Cutie game object not attached to BoxOpening!"); } else { cutieRenderer = cutie.GetComponent <SpriteRenderer>(); if (null == cutieRenderer) { Debug.LogError("BoxOpening could not find SpriteRenderer on Cutie object!"); } jumpUp = cutie.GetComponent <JumpUp>(); if (null == jumpUp) { Debug.LogError("BoxOpening could not find JumpUp on Cutie object!"); } } if (null == soundPlayer) { Debug.LogError("Sound Player game object not attached to BoxOpening!"); } else { revealSound = soundPlayer.GetComponent <AudioSource>(); if (null == revealSound) { Debug.LogError("Closed box could not find AudioSource on Sound Player object!"); } } }