Exemplo n.º 1
0
 public GleeokHead(IEnemy body)
 {
     neckBase              = new Point(body.Physics.Bounds.Center.X, body.Physics.Bounds.Bottom);
     parent                = body;
     RandomStateGenerator  = new RandomStateGenerator(this);
     States                = new Dictionary <RandomStateGenerator.StateType, int>(GameData.Instance.EnemyStateWeights.GleeokHeadStateList);
     Health                = new HealthManager(GameData.Instance.EnemyHealthConstants.GleeokHeadHealth);
     Physics               = new Physics(neckBase.ToVector2());
     Physics.Mass          = GameData.Instance.EnemyMassConstants.DragonMass;
     Physics.IsMovable     = false;
     CurrentState          = new IdleEnemyState(this);
     Physics.Bounds        = new Rectangle((int)Physics.Location.X, (int)Physics.Location.Y, EnemySpriteFactory.GetEnemyWidth(this), EnemySpriteFactory.GetEnemyHeight(this));
     EnemyCollisionHandler = new EnemyCollisionHandler(this);
     Expired               = false;
     Damage                = GameData.Instance.EnemyDamageConstants.FullHeart + GameData.Instance.EnemyDamageConstants.HalfHeart;
     MoveSpeed             = GameData.Instance.EnemySpeedConstants.GleeokHeadSpeed;
     DamageTimer           = 0;
     MinMaxWander          = new Point(LoZGame.Instance.UpdateSpeed / 4, LoZGame.Instance.UpdateSpeed);
     CurrentTint           = LoZGame.Instance.DefaultTint;
     IsBossPart            = true;
     HasChild              = false;
     AI         = EnemyAI.GleeokHead;
     IsSpawning = false;
     DropTable  = GameData.Instance.EnemyDropTables.EmptyDropTable;
     ApplyDamageMod();
     ApplyLargeWeightModPos();
     ApplySmallHealthMod();
 }
Exemplo n.º 2
0
 public Patra(Vector2 location)
 {
     RandomStateGenerator = new RandomStateGenerator(this);
     States                = new Dictionary <RandomStateGenerator.StateType, int>(GameData.Instance.EnemyStateWeights.PatraStateList);
     Health                = new HealthManager(GameData.Instance.EnemyHealthConstants.PatraHealth);
     Physics               = new Physics(location);
     Physics.Mass          = GameData.Instance.EnemyMassConstants.PatraMass;
     Physics.IsMovable     = false;
     CurrentState          = new IdleEnemyState(this);
     Physics.Bounds        = new Rectangle((int)Physics.Location.X, (int)Physics.Location.Y, EnemySpriteFactory.GetEnemyWidth(this), EnemySpriteFactory.GetEnemyHeight(this));
     EnemyCollisionHandler = new EnemyCollisionHandler(this);
     Expired               = false;
     IsTransparent         = false;
     Damage                = GameData.Instance.EnemyDamageConstants.PatraDamage;
     DamageTimer           = 0;
     MoveSpeed             = GameData.Instance.EnemySpeedConstants.PatraSpeed;
     CurrentTint           = LoZGame.Instance.DefaultTint;
     spawnedChildren       = false;
     AI            = EnemyAI.Patra;
     DropTable     = GameData.Instance.EnemyDropTables.PatraDropTable;
     IsSpawning    = false;
     children      = new Dictionary <int, IEnemy>();
     deadChildren  = new List <int>();
     addedChildren = 0;
     rotationCheck = 0;
     childID       = 0;
 }
Exemplo n.º 3
0
 public GleeokBody(Vector2 location)
 {
     RandomStateGenerator = new RandomStateGenerator(this);
     States = new Dictionary <RandomStateGenerator.StateType, int>()
     {
         { RandomStateGenerator.StateType.Idle, 1 }
     };
     Health                = new HealthManager(GameData.Instance.EnemyHealthConstants.ManhandlaBodyHealth);
     Physics               = new Physics(location);
     Physics.Mass          = GameData.Instance.EnemyMassConstants.DragonMass;
     Physics.IsMovable     = false;
     CurrentState          = new IdleEnemyState(this);
     Physics.Bounds        = new Rectangle((int)Physics.Location.X, (int)Physics.Location.Y, EnemySpriteFactory.GetEnemyWidth(this), EnemySpriteFactory.GetEnemyHeight(this));
     EnemyCollisionHandler = new EnemyCollisionHandler(this);
     Expired               = false;
     IsTransparent         = true;
     Damage                = GameData.Instance.EnemyDamageConstants.DragonDamage;
     DamageTimer           = 0;
     MoveSpeed             = GameData.Instance.EnemySpeedConstants.ManhandlaMinSpeed;
     CurrentTint           = LoZGame.Instance.DefaultTint;
     spawnedChildren       = false;
     AI         = EnemyAI.NoSpawn;
     DropTable  = GameData.Instance.EnemyDropTables.GleeokDropTable;
     IsSpawning = false;
 }
Exemplo n.º 4
0
 public RedMoldormHead(Vector2 location)
 {
     RandomStateGenerator = new RandomStateGenerator(this);
     States                = new Dictionary <RandomStateGenerator.StateType, int>(GameData.Instance.EnemyStateWeights.FireSnakeStateList);
     Health                = new HealthManager(GameData.Instance.EnemyHealthConstants.FireSnakeHealth);
     Physics               = new Physics(location);
     Physics.Mass          = GameData.Instance.EnemyMassConstants.FireSnakeMass;
     Physics.IsMovable     = false;
     CurrentState          = new IdleEnemyState(this);
     Physics.Bounds        = new Rectangle((int)Physics.Location.X, (int)Physics.Location.Y, EnemySpriteFactory.GetEnemyWidth(this), EnemySpriteFactory.GetEnemyHeight(this));
     EnemyCollisionHandler = new EnemyCollisionHandler(this);
     Expired               = false;
     Damage                = GameData.Instance.EnemyDamageConstants.FireSnakeDamage;
     DamageTimer           = 0;
     MoveSpeed             = GameData.Instance.EnemySpeedConstants.RedFireSnakeSpeed;
     CurrentTint           = LoZGame.Instance.DefaultTint;
     HasChild              = true;
     children              = new List <IEnemy>();
     spawnedChildren       = false;
     AI         = EnemyAI.MoldormHead;
     IsSpawning = false;
     DropTable  = GameData.Instance.EnemyDropTables.RedMoldormDropTable;
     ApplyDamageMod();
     ApplySmallSpeedMod();
     ApplySmallWeightModPos();
     ApplyLargeHealthMod();
     MinMaxWander = new Point(LoZGame.Instance.UpdateSpeed);
 }
Exemplo n.º 5
0
 public GleeokNeck(IEnemy body)
 {
     parent = body;
     RandomStateGenerator = new RandomStateGenerator(this);
     States                = new Dictionary <RandomStateGenerator.StateType, int>(GameData.Instance.EnemyStateWeights.ManhandlaHeadStateList);
     Health                = new HealthManager(GameData.Instance.EnemyHealthConstants.GleeokNeckHealth);
     Physics               = new Physics(body.Physics.Bounds.Center.ToVector2());
     Physics.Mass          = GameData.Instance.EnemyMassConstants.DragonMass;
     Physics.IsMovable     = false;
     CurrentState          = new IdleEnemyState(this);
     Physics.Bounds        = new Rectangle((int)Physics.Location.X, (int)Physics.Location.Y, EnemySpriteFactory.GetEnemyWidth(this), EnemySpriteFactory.GetEnemyHeight(this));
     EnemyCollisionHandler = new EnemyCollisionHandler(this);
     Expired               = false;
     Damage                = 0;
     DamageTimer           = 0;
     MoveSpeed             = 0;
     CurrentTint           = LoZGame.Instance.DefaultTint;
     IsBossPart            = true;
     HasChild              = true;
     AI            = EnemyAI.NoAI;
     DropTable     = GameData.Instance.EnemyDropTables.EmptyDropTable;
     IsTransparent = true;
     ApplyDamageMod();
     ApplyLargeWeightModPos();
     ApplyLargeHealthMod();
 }
Exemplo n.º 6
0
 public ManhandlaHead(IEnemy body, Physics.Direction side)
 {
     parent = body;
     RandomStateGenerator = new RandomStateGenerator(this);
     States                   = new Dictionary <RandomStateGenerator.StateType, int>(GameData.Instance.EnemyStateWeights.ManhandlaHeadStateList);
     Health                   = new HealthManager(GameData.Instance.EnemyHealthConstants.ManhandlaHeadHealth);
     Physics                  = new Physics(body.Physics.Bounds.Center.ToVector2());
     Physics.Mass             = GameData.Instance.EnemyMassConstants.DragonMass;
     Physics.IsMovable        = false;
     Physics.CurrentDirection = side;
     Physics.Bounds           = new Rectangle((int)Physics.Location.X, (int)Physics.Location.Y, EnemySpriteFactory.GetEnemyWidth(this), EnemySpriteFactory.GetEnemyHeight(this));
     Setup();
     CurrentState          = new IdleEnemyState(this);
     EnemyCollisionHandler = new EnemyCollisionHandler(this);
     Expired      = false;
     Damage       = GameData.Instance.EnemyDamageConstants.DragonDamage;
     MoveSpeed    = 0;
     CurrentTint  = LoZGame.Instance.DefaultTint;
     IsBossPart   = true;
     AI           = EnemyAI.ManHandlaHead;
     IsSpawning   = false;
     buffedParent = false;
     DropTable    = GameData.Instance.EnemyDropTables.EmptyDropTable;
     ApplyDamageMod();
     ApplyLargeWeightModPos();
     ApplyLargeHealthMod();
 }
Exemplo n.º 7
0
 public MiniPatra(IEnemy body)
 {
     parent   = body;
     Physics  = new Physics(Vector2.Zero);
     rotation = -MathHelper.PiOver2;
     SetLocation();
     RandomStateGenerator = new RandomStateGenerator(this);
     States = new Dictionary <RandomStateGenerator.StateType, int>()
     {
         { RandomStateGenerator.StateType.Idle, 1 },
     };
     Health                = new HealthManager(1);
     Physics.Mass          = GameData.Instance.EnemyMassConstants.PatraMass;
     Physics.IsMovable     = false;
     CurrentState          = new IdleEnemyState(this);
     Physics.Bounds        = new Rectangle((int)Physics.Location.X, (int)Physics.Location.Y, EnemySpriteFactory.GetEnemyWidth(this), EnemySpriteFactory.GetEnemyHeight(this));
     EnemyCollisionHandler = new EnemyCollisionHandler(this);
     Expired               = false;
     Damage                = GameData.Instance.EnemyDamageConstants.MiniPatraDamage;
     MoveSpeed             = GameData.Instance.EnemySpeedConstants.PatraSpeed;
     DamageTimer           = 0;
     MinMaxWander          = new Point(LoZGame.Instance.UpdateSpeed / 4, LoZGame.Instance.UpdateSpeed);
     CurrentTint           = LoZGame.Instance.DefaultTint;
     HasChild              = false;
     AI         = EnemyAI.MiniPatra;
     IsSpawning = false;
     DropTable  = GameData.Instance.EnemyDropTables.EmptyDropTable;
     ApplyDamageMod();
     ApplySmallWeightModPos();
 }
Exemplo n.º 8
0
 public GleeokHeadOff(IEnemy body, Point spawnPoint)
 {
     parent = body;
     RandomStateGenerator = new RandomStateGenerator(this);
     States                = new Dictionary <RandomStateGenerator.StateType, int>(GameData.Instance.EnemyStateWeights.GleeokHeadOffStateList);
     Health                = new HealthManager(1);
     Physics               = new Physics(spawnPoint.ToVector2());
     Physics.Mass          = 1;
     Physics.IsMovable     = false;
     CurrentState          = new IdleEnemyState(this);
     Physics.Bounds        = new Rectangle((int)Physics.Location.X, (int)Physics.Location.Y, EnemySpriteFactory.GetEnemyWidth(this), EnemySpriteFactory.GetEnemyHeight(this));
     EnemyCollisionHandler = new EnemyCollisionHandler(this);
     IsTransparent         = true;
     IsKillable            = false;
     Expired               = false;
     Damage                = GameData.Instance.EnemyDamageConstants.FullHeart;
     MoveSpeed             = GameData.Instance.EnemySpeedConstants.GleeokHeadOffSpeed;
     DamageTimer           = 0;
     MinMaxWander          = new Point(LoZGame.Instance.UpdateSpeed);
     CurrentTint           = LoZGame.Instance.DefaultTint;
     IsBossPart            = true;
     HasChild              = false;
     AI         = EnemyAI.GleeokHeadOff;
     DropTable  = GameData.Instance.EnemyDropTables.EmptyDropTable;
     IsSpawning = false;
     ApplyDamageMod();
     ApplyLargeSpeedMod();
 }
Exemplo n.º 9
0
 public OldMan(Vector2 location)
 {
     Physics              = new Physics(location);
     flameOffset          = new Point(130, 0);
     RandomStateGenerator = new RandomStateGenerator(this);
     States                = new Dictionary <RandomStateGenerator.StateType, int>(GameData.Instance.EnemyStateWeights.OldManStateList);
     CurrentState          = new IdleEnemyState(this);
     EnemyCollisionHandler = new EnemyCollisionHandler(this);
     Physics.Bounds        = new Rectangle((int)Physics.Location.X, (int)Physics.Location.Y, EnemySpriteFactory.GetEnemyWidth(this), EnemySpriteFactory.GetEnemyHeight(this));
     Health                = new HealthManager(GameData.Instance.EnemyHealthConstants.OldManHealth);
     Expired               = false;
     Damage                = GameData.Instance.EnemyDamageConstants.OldManDamage;
     DamageTimer           = 0;
     MoveSpeed             = GameData.Instance.EnemySpeedConstants.OldManSpeed;
     CurrentTint           = Color.White;
     timesShot             = 0;
     DropTable             = GameData.Instance.EnemyDropTables.EmptyDropTable;
     IsKillable            = false;
 }
Exemplo n.º 10
0
 public Dragon(Vector2 location)
 {
     RandomStateGenerator = new RandomStateGenerator(this);
     States                = new Dictionary <RandomStateGenerator.StateType, int>(GameData.Instance.EnemyStateWeights.DragonStateList);
     Health                = new HealthManager(GameData.Instance.EnemyHealthConstants.DragonHealth);
     Physics               = new Physics(location);
     Physics.Mass          = GameData.Instance.EnemyMassConstants.DragonMass;
     Physics.IsMovable     = false;
     CurrentState          = new IdleEnemyState(this);
     Physics.Bounds        = new Rectangle((int)Physics.Location.X, (int)Physics.Location.Y, EnemySpriteFactory.GetEnemyWidth(this), EnemySpriteFactory.GetEnemyHeight(this));
     EnemyCollisionHandler = new EnemyCollisionHandler(this);
     Expired               = false;
     Damage                = GameData.Instance.EnemyDamageConstants.DragonDamage;
     DamageTimer           = 0;
     MoveSpeed             = GameData.Instance.EnemySpeedConstants.DragonSpeed;
     CurrentTint           = LoZGame.Instance.DefaultTint;
     DropTable             = GameData.Instance.EnemyDropTables.DragonDropTable;
     ApplyDamageMod();
     ApplySmallSpeedMod();
     ApplyLargeWeightModPos();
     ApplyLargeHealthMod();
 }
Exemplo n.º 11
0
 public override void OnCollisionResponse(int sourceWidth, int sourceHeight, CollisionDetection.CollisionSide collisionSide)
 {
     CurrentState   = new IdleEnemyState(this);
     Physics.Bounds = new Rectangle(InitialPos, Physics.Bounds.Size);
     Physics.SetLocation();
 }
Exemplo n.º 12
0
 public override void UpdateState()
 {
     CurrentState = new IdleEnemyState(this);
 }