Exemple #1
0
 void Awake()
 {
     state = States.Idle;
     if (body == null)
     {
         body = this.gameObject.GetComponent <Rigidbody2D>();
     }
     if (blaster == null)
     {
         blaster = this.gameObject.GetComponent <BlasterController>();
     }
     cooldownTime = 0;
     health       = maxHealth;
 }
Exemple #2
0
 void Awake()
 {
     if (body == null)
     {
         body = this.gameObject.GetComponent <Rigidbody2D>();
     }
     if (status == null)
     {
         status = GetComponent <PlayerStatus>();
     }
     invicibleTime = invincibilityTime;
     cooldownTime  = shootCooldown;
     blaster       = this.gameObject.GetComponent <BlasterController>();
     level         = this.gameObject.GetComponent <ShipLevel>();
 }