Beispiel #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;
            }
        }
    }
Beispiel #2
0
 void Start()
 {
     anim        = GetComponent <Animator>();
     boltcounter = FindObjectOfType <BoltCounter>();
     player      = FindObjectOfType <BoltyMovement>();
     anim.SetTrigger("LevelComplete");
     directionalArrow.SetActive(true);
 }
Beispiel #3
0
 void Start()
 {
     boltcounter = FindObjectOfType <BoltCounter>();
     player      = FindObjectOfType <BoltyMovement>();
 }
Beispiel #4
0
 void Start()
 {
     player = FindObjectOfType <BoltyMovement>();
 }
Beispiel #5
0
 // Start is called before the first frame update
 void Start()
 {
     playerInput = GetComponentInParent <BoltyMovement>();
     anim        = GetComponent <Animator>();
 }
Beispiel #6
0
 private void Start()
 {
     boltyMovement = FindObjectOfType <BoltyMovement>();
     PlayerHealth  = 50;
     gameOver.SetActive(false);
 }