private void Start() { inputBehaviour = FindObjectOfType <InputBehaviour>(); myRigidbody2D = GetComponent <Rigidbody2D>(); myTriggerCollision = GetComponent <PlayerTriggerCollision>(); oldMovementSpeed = movementSpeed; }
private void Start() { input = FindObjectOfType <InputBehaviour>(); myPlayerData = FindObjectOfType <PlayerData>(); myPlayerTriggerCollision = FindObjectOfType <PlayerTriggerCollision>(); myComputerUI = FindObjectOfType <DesktopUI>(); StartCoroutine(myUpdate(.5f)); }
private ParticleSystem _CastSpel_PS; //Animator for the player private void Awake() { _movement = GetComponent <PlayerMovement>(); _body = GetComponent <Rigidbody2D>(); _shield = GetComponent <PlayerShield>(); _triggerCollision = transform.Find("CollisionDetection").GetComponent <PlayerTriggerCollision>(); _attackResource = GetComponent <PlayerAttackResource>(); //ref to animator to update when moving _animatorRED = this.gameObject.transform.GetChild(1).GetComponent <Animator>(); _animatorBLUE = this.gameObject.transform.GetChild(2).GetComponent <Animator>(); //ref to particle system _CastSpel_PS = this.gameObject.transform.GetChild(3).GetComponent <ParticleSystem>(); }
private Animator _animatorBlue; //Animator for the player private void Awake() { _transform = transform; _body = GetComponent <Rigidbody2D>(); _triggerCollision = GetComponent <PlayerTriggerCollision>(); /* * if (OnLandEvent == null) * { * OnLandEvent = new UnityEvent(); * } */ //ref to animator to update when moving _animatorRED = this.gameObject.transform.GetChild(1).GetComponent <Animator>(); _animatorBlue = this.gameObject.transform.GetChild(2).GetComponent <Animator>(); }