Exemplo n.º 1
0
    void OnTriggerStay2D(Collider2D collider)
    {
        BoltyMovement player = collider.gameObject.GetComponent <BoltyMovement>();

        if (player)
        {
            if (furthestRight)
            {
                player.onFurthestRight = true;
            }
            else if (!furthestRight)
            {
                player.onFurthestRight = false;
            }


            if (furthestLeft)
            {
                player.onFurthestLeft = true;
            }
            else if (!furthestLeft)
            {
                player.onFurthestLeft = false;
            }
        }
    }
Exemplo n.º 2
0
 void Start()
 {
     anim        = GetComponent <Animator>();
     boltcounter = FindObjectOfType <BoltCounter>();
     player      = FindObjectOfType <BoltyMovement>();
     anim.SetTrigger("LevelComplete");
     directionalArrow.SetActive(true);
 }
Exemplo n.º 3
0
 void Start()
 {
     boltcounter = FindObjectOfType <BoltCounter>();
     player      = FindObjectOfType <BoltyMovement>();
 }
Exemplo n.º 4
0
 void Start()
 {
     player = FindObjectOfType <BoltyMovement>();
 }
Exemplo n.º 5
0
 // Start is called before the first frame update
 void Start()
 {
     playerInput = GetComponentInParent <BoltyMovement>();
     anim        = GetComponent <Animator>();
 }
Exemplo n.º 6
0
 private void Start()
 {
     boltyMovement = FindObjectOfType <BoltyMovement>();
     PlayerHealth  = 50;
     gameOver.SetActive(false);
 }