private bool playerDead; //角色是否死亡 void Awake() { anim = GetComponent <Animator>(); playerMovement = GetComponent <PlayerMovement>(); hash = GameObject.FindWithTag(Tags.GameController).GetComponent <HashIDs>(); sceneFadeInOut = GameObject.FindWithTag(Tags.Fader).GetComponent <SceneFaderInOut>(); lastPlayerSighting = GameObject.FindWithTag(Tags.GameController).GetComponent <LastPlayerSighting>(); }
private void Awake() { player = GameObject.FindGameObjectWithTag(Tags.player); sceneFadeInOut = GameObject.FindGameObjectWithTag(Tags.fader).GetComponent <SceneFaderInOut>(); }