Esempio n. 1
0
 private void Awake()
 {
     enemy_Rigidbody = gameObject.GetComponent <Rigidbody2D>();
     enemy_Animator  = gameObject.GetComponent <Animator>();
     character       = GameObject.FindGameObjectWithTag("Character");
     thePLayer       = character.GetComponent <PlayerStatement>();
     finish          = FindObjectOfType <FinishPoint>();
 }
Esempio n. 2
0
 private void Start()
 {
     m_Stats    = FindObjectOfType <PlayerStats>();
     m_Player   = FindObjectOfType <PlayerStatement>();
     m_Respawns = FindObjectOfType <ItemRespawn>();
     playerUI   = FindObjectOfType <PlayerItemsCount>();
     finish     = FindObjectOfType <FinishPoint>();
     alert      = FindObjectOfType <Alert>();
 }
Esempio n. 3
0
    private void OnColideWithFinishPoint(FinishPoint finishPoint)
    {
        if (finishPoint.TeamId != teamId)
        {
            return;
        }

        mover.StartMoveTo(finishPoint.transform.position);
        animations.PlayJumpAnimation();

        Events.unitReachFinishPointEvent?.Invoke();
    }