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; }
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); } }
public void SetWeapon(DummyWeapon weapon) { this.weapon = weapon; }