void Awake() { input = GetComponent <PlayerInput>(); bodyMovement = GetComponent <BodyMovement>(); dash = GetComponent <PlayerDash>(); rayMask = shieldLayerMask | wallLayerMask; comparer = new RaycastHitAscendingDistanceComparer(); }
public void AddBody() { BodyMovement nextBodyPart = Instantiate(bodyPrototype); if (body.Count > 0) { nextBodyPart.Init(body[body.Count - 1]); } else { nextBodyPart.Init(transform); } nextBodyPart.gameObject.SetActive(true); body.Add( nextBodyPart.transform ); }
void Awake() { body = GetComponent <BodyMovement>(); InputX = 0.0f; JumpPressed = false; }
void Awake() { input = GetComponent <PlayerInput>(); bodyMovement = GetComponent <BodyMovement>(); rangedAttack = GetComponent <PlayerRangedAttack>(); }