// 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 }
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"); }