Exemplo n.º 1
0
    void Start()
    {
        BulletHolder = new GameObject("Bullet Holder");

        Player = gameObject;
        rb     = GetComponent <Rigidbody2D>();

        stateHolder = GetComponent <PlayerStateHolder>();
    }
Exemplo n.º 2
0
 void Start()
 {
     Player            = gameObject;
     rb                = GetComponent <Rigidbody2D>();
     anim              = GetComponent <Animator>();
     health            = GetComponent <HealthController>();
     renderer          = GetComponent <SpriteRenderer>();
     RegularColor      = renderer.color;
     StaminaController = this.GetComponent <StaminaController>();
     FreezeTime        = 0;
     walkingSound      = this.GetComponents <AudioSource>()[0];
     dashSound         = this.GetComponents <AudioSource>()[1];
     stateHolder       = this.GetComponent <PlayerStateHolder>();
 }