コード例 #1
0
 private void OnDestroy()
 {
     if (player != null)
     {
         player.EnableJump(this);
     }
 }
コード例 #2
0
        /// <summary>
        /// Waits a predetermined amount of time before allowing the player to move again.
        /// </summary>
        private IEnumerator _WaitToEnableControls()
        {
            player.FSM.Reset();

            yield return(new WaitForSeconds(RESPAWN_DELAY));

            player.EnableCrouch(this);
            player.EnableJump(this);
            player.EnableMove(this);

            isDead = false;
        }