public Missile(Fraction fraction, Func <Missile, SpaceShip> targetSelector)
     : base(fraction)
 {
     Class             = ShipClasses.Missile;
     Weapon            = new DummyWeapon(this);
     TargetSelector    = targetSelector;
     PreciseAngleSpeed = true;
     ReachedTarget    += Missile_ReachedTarget;
     StatusChanged    += Missile_StatusChanged;
 }
Example #2
0
    private void DummyTest()
    {
        Dummy dummy = character.GetComponent <Dummy>();

        if (dummy)
        {
            DummyWeapon dummyWeapon = gameObject.AddComponent <DummyWeapon>();
            dummyWeapon.Setup(reloadTime, damage, maximumMagazineCapacity, firerate, bulletSpeed, weaponOffset, desiredZRotation, shootingPositions, audioSources, weaponBody);
            dummyWeapon.SetDummy(dummy);
            Destroy(this);
        }
    }
Example #3
0
 public void SetWeapon(DummyWeapon weapon)
 {
     this.weapon = weapon;
 }