public Missile(Point location, YRotation rotation) { Texture = Assets.GetTexture("rocket"); Rectangle = new Rectangle(location, DefaultSize); isDestroyed = false; Rotation = rotation; }
protected void shift_Y_rotation(int delta) { yRotation = (YRotation)(((int)yRotation + delta) % Enum.GetNames(typeof(YRotation)).Length); if (yRotation < 0) { yRotation = 0; } create_deploy_hint_mesh(); ShowDeployHint = true; }
public override string ToString() { return(YRotation.ToString() + " " + XRotation.ToString()); }
protected override void WriteDataXML(XElement ele, ElderScrollsPlugin master) { XElement subEle; ele.TryPathTo("Flags", true, out subEle); subEle.Value = Flags.ToString(); ele.TryPathTo("Type", true, out subEle); subEle.Value = Type.ToString(); ele.TryPathTo("Gravity", true, out subEle); subEle.Value = Gravity.ToString("G15"); ele.TryPathTo("Speed", true, out subEle); subEle.Value = Speed.ToString("G15"); ele.TryPathTo("Range", true, out subEle); subEle.Value = Range.ToString("G15"); ele.TryPathTo("Light", true, out subEle); Light.WriteXML(subEle, master); ele.TryPathTo("MuzzleFlash/Light", true, out subEle); MuzzleFlashLight.WriteXML(subEle, master); ele.TryPathTo("TracerChance", true, out subEle); subEle.Value = TracerChance.ToString("G15"); ele.TryPathTo("Explosion/AltTrigger/Proximity", true, out subEle); subEle.Value = ExplosionAltTriggerProximity.ToString("G15"); ele.TryPathTo("Explosion/AltTrigger/Timer", true, out subEle); subEle.Value = ExplosionAltTriggerTimer.ToString("G15"); ele.TryPathTo("Explosion/Form", true, out subEle); Explosion.WriteXML(subEle, master); ele.TryPathTo("Sound", true, out subEle); Sound.WriteXML(subEle, master); ele.TryPathTo("MuzzleFlash/Duration", true, out subEle); subEle.Value = MuzzleFlashDuration.ToString("G15"); ele.TryPathTo("FadeDuration", true, out subEle); subEle.Value = FadeDuration.ToString("G15"); ele.TryPathTo("ImpactForce", true, out subEle); subEle.Value = ImpactForce.ToString("G15"); ele.TryPathTo("Sound/Countdown", true, out subEle); SoundCountdown.WriteXML(subEle, master); ele.TryPathTo("Sound/Disable", true, out subEle); Sounddisable.WriteXML(subEle, master); ele.TryPathTo("DefaultWeaponSource", true, out subEle); DefaultWeaponSource.WriteXML(subEle, master); ele.TryPathTo("XRotation", true, out subEle); subEle.Value = XRotation.ToString("G15"); ele.TryPathTo("YRotation", true, out subEle); subEle.Value = YRotation.ToString("G15"); ele.TryPathTo("ZRotation", true, out subEle); subEle.Value = ZRotation.ToString("G15"); ele.TryPathTo("BouncyMult", true, out subEle); subEle.Value = BouncyMult.ToString("G15"); }