示例#1
0
 public WeaponEditor()
 {
     InitializeComponent();
     ProjectileDetailEditor = new ProjectileEditor();
     ExplosionAttributes    = new ExplosionOptions();
     ExplosionAttributes.ExplosionAnimation = new GameScreens.AnimationScreen.SimpleAnimation();
 }
示例#2
0
 public InvisibleFireball(float Damage, ExplosionOptions ExplosionAttributes, RobotAnimation Owner, Vector2 Position, float Angle,
                          MagicUserParams MagicParams, IMagicUser Parent)
     : base(Damage, ExplosionAttributes, Owner, Position, Angle)
 {
     this.MagicParams = MagicParams;
     this.Parent      = Parent;
     MagicParams.SetMagicUser(Parent);
 }
示例#3
0
        private void tsmExplosionAttributes_Click(object sender, EventArgs e)
        {
            ExplosionAttributesEditor NewEditor = new ExplosionAttributesEditor(ExplosionAttributes);

            if (NewEditor.ShowDialog() == System.Windows.Forms.DialogResult.OK)
            {
                ExplosionAttributes = NewEditor.ExplosionAttributes;
            }
        }
示例#4
0
        /// <summary>
        /// Load a Weapon at selected path.
        /// </summary>
        /// <param name="PartPath">Path from which to open the Combo.</param>
        private void LoadWeapon(string ComboPath)
        {
            string Name = ComboPath.Substring(0, ComboPath.Length - 4).Substring(31);

            this.Text = Name + " - Project Eternity Triple Thunder Weapon Editor";

            FileStream   FS = new FileStream("Content/Triple Thunder/Weapons/" + Name + ".ttw", FileMode.Open, FileAccess.Read);
            BinaryReader BR = new BinaryReader(FS, Encoding.UTF8);

            cbWeaponType.SelectedIndex    = BR.ReadInt32();
            txtDamage.Value               = (decimal)BR.ReadSingle();
            txtMaxDurability.Value        = (decimal)BR.ReadSingle();
            txtMinAngle.Value             = (decimal)BR.ReadSingle();
            txtMaxAngle.Value             = (decimal)BR.ReadSingle();
            ckUseRangedProperties.Checked = BR.ReadBoolean();
            txtSkillChain.Text            = BR.ReadString();

            ExplosionAttributes = new ExplosionOptions(BR);

            if (ckUseRangedProperties.Checked)
            {
                txtAmmoPerMagazine.Value       = (decimal)BR.ReadSingle();
                txtAmmoRegen.Value             = (decimal)BR.ReadSingle();
                txtRecoil.Value                = (decimal)BR.ReadSingle();
                txtMaxRecoil.Value             = (decimal)BR.ReadSingle();
                txtRecoilRecoverySpeed.Value   = (decimal)BR.ReadSingle();
                txtNumberOfProjectiles.Value   = BR.ReadInt32();
                cbProjectileType.SelectedIndex = BR.ReadInt32();

                if (cbProjectileType.SelectedIndex > 0)
                {
                    ProjectileDetailEditor.txtProjectileSpeed.Value    = (decimal)BR.ReadSingle();
                    ProjectileDetailEditor.ckAffectedByGravity.Checked = BR.ReadBoolean();
                    ProjectileDetailEditor.ckAllowRotation.Checked     = BR.ReadBoolean();
                    ProjectileDetailEditor.IsProjectileAnimated        = BR.ReadBoolean();
                    ProjectileDetailEditor.txtProjectilePath.Text      = BR.ReadString();

                    ProjectileDetailEditor.cboTrailStyle.SelectedIndex = BR.ReadByte();

                    if (ProjectileDetailEditor.cboTrailStyle.SelectedIndex == 2)
                    {
                        ProjectileDetailEditor.cboTrailEffect.SelectedIndex = BR.ReadByte();
                        ProjectileDetailEditor.IsTrailAnimated   = BR.ReadBoolean();
                        ProjectileDetailEditor.txtTrailPath.Text = BR.ReadString();
                    }

                    txtProjectile.Text = ProjectileDetailEditor.txtProjectilePath.Text;
                }
            }

            BR.Close();
            FS.Close();
        }