示例#1
0
 // Start is called before the first frame update
 void Start()
 {
     player = FindObjectOfType <GridMovement2D>();
     lastStateTransitionTime = startUpDelay == 0.0f ? 0.0f : Time.time;
     safeID = Animator.StringToHash("Safe");
     Invoke("StartKillStates", startUpDelay);    // Delay kill states switching for variable trap times
 }
示例#2
0
 void Awake()
 {
     playerMovement = GetComponent <GridMovement2D>();
     if (playerMovement == null)
     {
         Debug.Log("GridMovement2D component not attached onto " + gameObject.name + " for Death component to reference.");
     }
     deadID = Animator.StringToHash("Dead");
 }