Ejemplo n.º 1
0
 public EnemyType(EnemyType t)
 {
     fname = t.fname;
     Health = t.Health;
     ShootInterval = t.ShootInterval;
     shootDir = t.shootDir;
     moveDir = t.moveDir;
     CanMoveOut = t.CanMoveOut;
     Points = t.Points;
     Width = t.Width;
     Height = t.Height;
 }
Ejemplo n.º 2
0
        //File:
        //timeTillBoss (ms)
        //enemyInterval(ms)
        //<enemytype1>fname|health|shootint.(ms)|shoot,dir|move,dir|(0 or 1)canmoveout|points
        //<enemytype2>....
        public StageLogic(string fname)
        {
            using(StreamReader sr = new StreamReader(fname))
            {
                string file = sr.ReadToEnd();
                string[] lines = file.Split('\n');
                this.timeTillBoss = double.Parse(lines[0]);
                this.enemyInterval = double.Parse(lines[1]);
                EnemyType weak = new EnemyType(lines[2]);
                EnemyType normal = new EnemyType(lines[3]);
                EnemyType strong = new EnemyType(lines[4]);

                Enemies = new Dictionary<EnemyTypeEnum, EnemyType>()
                {
                    {EnemyTypeEnum.Weak,  weak },
                    {EnemyTypeEnum.Normal, normal },
                    {EnemyTypeEnum.Strong, strong }
                };
            }
        }
Ejemplo n.º 3
0
 public EnemyBl(EnemyModel em, EnemyType t)
 {
     base.shape = em;
     this.etype = t;
 }