private void Awake() { enemy_Rigidbody = gameObject.GetComponent <Rigidbody2D>(); enemy_Animator = gameObject.GetComponent <Animator>(); character = GameObject.FindGameObjectWithTag("Character"); thePLayer = character.GetComponent <PlayerStatement>(); finish = FindObjectOfType <FinishPoint>(); }
private void Start() { m_Stats = FindObjectOfType <PlayerStats>(); m_Player = FindObjectOfType <PlayerStatement>(); m_Respawns = FindObjectOfType <ItemRespawn>(); playerUI = FindObjectOfType <PlayerItemsCount>(); finish = FindObjectOfType <FinishPoint>(); alert = FindObjectOfType <Alert>(); }
private void OnColideWithFinishPoint(FinishPoint finishPoint) { if (finishPoint.TeamId != teamId) { return; } mover.StartMoveTo(finishPoint.transform.position); animations.PlayJumpAnimation(); Events.unitReachFinishPointEvent?.Invoke(); }