Beispiel #1
0
        public frmEnemyEditor(DataTypes.EnemyProfile ThisEnemy)
        {
            InitializeComponent();
            ChangeMade = false;

            Behaviour Behaviour = new Behaviour();

            Behaviour.ShortDesc = "AttackPlayer";
            Behaviour.LongDesc  = "Always Attack Player";
            EnemyBehaviour.Add(Behaviour);
            Behaviour.ShortDesc = "AttackBestDamage";
            Behaviour.LongDesc  = "Attack Enemy who deals most Damage";
            EnemyBehaviour.Add(Behaviour);
            Behaviour.ShortDesc = "AttackWorstDamage";
            Behaviour.LongDesc  = "Attack Enemy who deals least Damage";
            EnemyBehaviour.Add(Behaviour);
            Behaviour.ShortDesc = "AttackStrongDefense";
            Behaviour.LongDesc  = "Attack Enemy who has most Armor";
            EnemyBehaviour.Add(Behaviour);
            Behaviour.ShortDesc = "AttackWeakDefense";
            Behaviour.LongDesc  = "Attack Enemy who has least Armor";
            EnemyBehaviour.Add(Behaviour);
            Behaviour.ShortDesc = "AttackMostHP";
            Behaviour.LongDesc  = "Attack Enemy who has most HP";
            EnemyBehaviour.Add(Behaviour);
            Behaviour.ShortDesc = "AttackLeastHP";
            Behaviour.LongDesc  = "Attack Enemy who has least HP";
            EnemyBehaviour.Add(Behaviour);
            Behaviour.ShortDesc = "AttackRandom";
            Behaviour.LongDesc  = "Attack and Enemy at Random";
            EnemyBehaviour.Add(Behaviour);

            Enemy = ThisEnemy;
            PopulateEnemy();
        }
Beispiel #2
0
        private void lstEnemies_MouseDoubleClick(object sender, MouseEventArgs e)
        {
            if (lstEnemies.SelectedIndex > -1)
            {
                DataTypes.EnemyProfile EditEnemy = new DataTypes.EnemyProfile();
                EditEnemy = Event.Enemies[lstEnemies.SelectedIndex];
                frmEnemyEditor NewForm = new frmEnemyEditor(EditEnemy);
                NewForm.ShowDialog();

                EditEnemy = NewForm.Enemy;
                Event.Enemies[lstEnemies.SelectedIndex] = (EditEnemy);
                GetAllEnemies();
            }
        }
Beispiel #3
0
        private void cmdAddEnemy_Click(object sender, EventArgs e)
        {
            DataTypes.EnemyProfile NewEnemy = new DataTypes.EnemyProfile();
            frmEnemyEditor         NewForm  = new frmEnemyEditor(NewEnemy);

            NewForm.ShowDialog();

            NewEnemy = NewForm.Enemy;
            if (NewEnemy.name != null)
            {
                if (Event.Enemies == null)
                {
                    Event.Enemies = new List <DataTypes.EnemyProfile>();
                }
                Event.Enemies.Add(NewEnemy);
            }
            GetAllEnemies();
        }
        private void lstEnemies_MouseDoubleClick(object sender, MouseEventArgs e)
        {
            if (lstEnemies.SelectedIndex > -1)
            {
                DataTypes.EnemyProfile EditEnemy = new DataTypes.EnemyProfile();
                EditEnemy = Room.Enemy[lstEnemies.SelectedIndex];
                frmEnemyEditor NewForm = new frmEnemyEditor(EditEnemy);
                NewForm.ShowDialog();

                EditEnemy = NewForm.Enemy;
                Room.Enemy[lstEnemies.SelectedIndex] = (EditEnemy);
                GetAllEnemies();
            }
        }
        private void cmdAddEnemy_Click(object sender, EventArgs e)
        {
            DataTypes.EnemyProfile NewEnemy = new DataTypes.EnemyProfile();
            frmEnemyEditor NewForm = new frmEnemyEditor(NewEnemy);
            NewForm.ShowDialog();

            NewEnemy = NewForm.Enemy;
            if (NewEnemy.name != null)
            {
                if (Room.Enemy == null) Room.Enemy = new List<DataTypes.EnemyProfile>();
                Room.Enemy.Add(NewEnemy);
            }
            GetAllEnemies();
        }