void Start() { rb = this.GetComponent <Rigidbody2D>(); anim = this.GetComponent <Animator>(); pGrounded = this.GetComponent <PlayerGrounded>(); dust = this.GetComponent <PlayerDustFX>(); }
// Start is called before the first frame update void Start() { pMovement = this.GetComponent <PlayerMovement>(); anim = this.GetComponent <Animator>(); dust = this.GetComponent <PlayerDustFX>(); layerMask = LayerMask.GetMask("Walkable"); sinceGroundedTimer = groundedTime; }
void Start() { rb = this.GetComponent<Rigidbody2D>(); playerSprite = this.GetComponent<SpriteRenderer>(); anim = this.GetComponent<Animator>(); dust = this.GetComponent<PlayerDustFX>(); // Init animator anim.SetBool("alive", true); this.transform.position = new Vector3(transform.position.x, transform.position.y, 0f); }