示例#1
0
 public void Initialize(EnemyData d)
 {
     sprite.sprite           = d.image;
     _myHealth.currentHealth = d.hp;
     _myHealth.maxHealth     = d.hp;
     _boxCollider.enabled    = !d.useCircleCollider;
     _circleCollider.enabled = d.useCircleCollider;
     if (d.useCircleCollider)
     {
         _circleCollider.radius = d.colliderSize;
     }
     else
     {
         _boxCollider.size = Vector2.one * d.colliderSize;
     }
     _myShooter.SetWeaponData(d.weapon);
     _points     = d.pointsGiven;
     _deathSound = d.playOnExplode;
 }
示例#2
0
 private void SetWeaponData()
 {
     shooter.SetWeaponData(_myShip.weaponProgression[_weaponIndex]);
 }