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; }
private void SetWeaponData() { shooter.SetWeaponData(_myShip.weaponProgression[_weaponIndex]); }