Esempio n. 1
0
        public Enemy(Enemy other)
            : base(other)
        {
            bAgro = other.bAgro;
            //fWanderTimer = other.fWanderTimer;
            fDamage = other.fDamage;
            pOrbDrop = other.pOrbDrop;
            bDrawHealth = other.bDrawHealth;

            Jitter = other.Jitter;
            CircleDist = other.CircleDist;
            CircleCentre = other.CircleCentre;
            WanderAngle = other.WanderAngle;
            WanderForce = other.WanderForce;
            WanderAngleRand = other.WanderAngleRand;

            fAttackRange = other.fAttackRange;
            fAttackCooldown = other.fAttackCooldown;
            fAttackDamage = other.fAttackDamage;

            pOrbDrop = other.pOrbDrop;
            iChanceDrop = other.iChanceDrop;
            iShootTimer = iShootMax = other.iShootMax;
            fLength = other.fLength;
            fWanderTimer = 0;
            fWanderCooldown = other.fWanderCooldown;

            fAnimationMax = other.fAnimationMax;

            base.UpdateIndex();
        }
Esempio n. 2
0
        public SpawnerEnemy(ContentManager Content, int i_ChanceDrop, float f_Health, float f_Speed, Enemy e_ToSpawn, String t2d_Tex = "image")
            : base(Content, i_ChanceDrop, t2d_Tex)
        {
            Speed = f_Speed;
            Position = new Vector2(Neuroleptic.Control.Rand.Next(80, 882), Neuroleptic.Control.Rand.Next(48, 445));
            HealthCurrent = HealthMax = f_Health;
            eToSpawn = e_ToSpawn;
            HealthCurrent = HealthMax = f_Health;
            eToSpawn.Position = Position;
            fSpawnCooldown = fSpawnTimer = 100;

            iSpawned = 0;

            UFrameMax = 1;
            VFrameMax = 1;
            FrameWidth = Texture.Width / UFrameMax;
            FrameHeight = Texture.Height / VFrameMax;
            UpdateIndex();
        }
Esempio n. 3
0
        public SpawnerEnemy(SpawnerEnemy other)
            : base(other)
        {
            Speed = other.Speed;
            Position = other.Position;
            HealthCurrent = other.HealthCurrent;
            HealthMax = other.HealthMax;
            eToSpawn = other.eToSpawn;
            fSpawnTimer = other.fSpawnTimer;
            fSpawnCooldown = other.fSpawnCooldown;
            iSpawned = other.iSpawned;

            UFrameMax = other.UFrameMax;
            VFrameMax = other.VFrameMax;
            FrameWidth = other.FrameWidth;
            FrameHeight = other.FrameHeight;

            UpdateIndex();
        }
Esempio n. 4
0
 //This is needed because we are refering to Enemy twice, creates some magical madness
 public void eToSpawnXMLImport(XmlReader xml_Reader, ContentManager Content)
 {
     while (xml_Reader.Read())
     {
         //Console.WriteLine("SpawnerEnemy eToSpawn : " + xml_Reader.Name);
         switch (xml_Reader.Name)
         {
             case "Enemy":
                 eToSpawn = new Enemy();
                 eToSpawn.xmlImport(xml_Reader, Content);
                 break;
             case "BossEnemy":
                 eToSpawn = new BossEnemy();
                 ((BossEnemy)eToSpawn).xmlImport(xml_Reader, Content);
                 break;
             case "BasicEnemy":
                 eToSpawn = new BasicEnemy();
                 ((BasicEnemy)eToSpawn).xmlImport(xml_Reader, Content);
                 break;
             case "SpawnerEnemy":
                 eToSpawn = new SpawnerEnemy();
                 ((SpawnerEnemy)eToSpawn).xmlImport(xml_Reader, Content);
                 break;
             case "EnemyToSpawn":
                 return;
         }
     }
 }