Ejemplo n.º 1
0
 void Start()
 {
     rb        = this.GetComponent <Rigidbody2D>();
     anim      = this.GetComponent <Animator>();
     pGrounded = this.GetComponent <PlayerGrounded>();
     dust      = this.GetComponent <PlayerDustFX>();
 }
Ejemplo n.º 2
0
    // 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;
    }
Ejemplo n.º 3
0
    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);
    }