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