Ejemplo n.º 1
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;
 }
Ejemplo n.º 2
0
 public Link(Vector2 location)
 {
     Physics                  = new Physics(location);
     Physics.Mass             = GameData.Instance.PlayerConstants.Mass;
     Health                   = new HealthManager(GameData.Instance.PlayerConstants.StartingHealth);
     Inventory                = new InventoryManager(this);
     BackupInventory          = new InventoryManager(Inventory);
     linkCollisionHandler     = new PlayerCollisionHandler(this);
     CurrentColor             = LinkColor.Green;
     Physics.CurrentDirection = Physics.Direction.North;
     CurrentTint              = Color.White;
     MoveSpeed                = GameData.Instance.PlayerConstants.PlayerSpeed;
     DamageTimer              = 0;
     DisarmedTimer            = 0;
     PurchaseLockout          = 0;
     State                = new IdleState(this);
     Physics.Bounds       = new Rectangle((int)Physics.Location.X, (int)Physics.Location.Y - 8, LinkSpriteFactory.LinkWidth, LinkSpriteFactory.LinkHeight - 8);
     Physics.BoundsOffset = new Vector2(0, -8);
     Physics.SetLocation();
 }
Ejemplo n.º 3
0
 public VireKeese(Vector2 location)
 {
     RandomStateGenerator = new RandomStateGenerator(this);
     States                = new Dictionary <RandomStateGenerator.StateType, int>(GameData.Instance.EnemyStateWeights.KeeseStateList);
     Health                = new HealthManager(GameData.Instance.EnemyHealthConstants.KeeseHealth);
     Physics               = new Physics(location);
     Physics.Mass          = GameData.Instance.EnemyMassConstants.KeeseMass;
     CurrentState          = new SpawnEnemyState(this);
     EntityManager         = LoZGame.Instance.GameObjects.Entities;
     Cooldown              = 0;
     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.KeeseDamage;
     DamageTimer           = 0;
     MoveSpeed             = GameData.Instance.EnemySpeedConstants.MinKeeseSpeed;
     CurrentTint           = LoZGame.Instance.DefaultTint;
     AI           = EnemyAI.Keese;
     DropTable    = GameData.Instance.EnemyDropTables.EmptyDropTable;
     MinMaxWander = new Point(GameData.Instance.EnemyMiscConstants.MinDirectionChange, GameData.Instance.EnemyMiscConstants.MaxDirectionChange);
 }
Ejemplo n.º 4
0
 public Likelike(Vector2 location)
 {
     Timer = 0;
     RandomStateGenerator = new RandomStateGenerator(this);
     States                = new Dictionary <RandomStateGenerator.StateType, int>(GameData.Instance.EnemyStateWeights.LikelikeStateList);
     Health                = new HealthManager(GameData.Instance.EnemyHealthConstants.LikelikeHealth);
     Physics               = new Physics(location);
     Physics.Mass          = GameData.Instance.EnemyMassConstants.LikelikeMass;
     CurrentState          = new SpawnEnemyState(this);
     EntityManager         = LoZGame.Instance.GameObjects.Entities;
     Cooldown              = 0;
     Physics.Bounds        = new Rectangle((int)Physics.Location.X, (int)Physics.Location.Y, EnemySpriteFactory.GetEnemyWidth(this), EnemySpriteFactory.GetEnemyHeight(this));
     EnemyCollisionHandler = new EnemyCollisionHandler(this);
     Expired               = false;
     IsDead                = false;
     Damage                = GameData.Instance.EnemyDamageConstants.LikelikeDamage;
     DamageTimer           = 0;
     MoveSpeed             = GameData.Instance.EnemySpeedConstants.LikelikeSpeed;
     CurrentTint           = LoZGame.Instance.DefaultTint;
     DropTable             = GameData.Instance.EnemyDropTables.LikelikeDropTable;
 }
Ejemplo n.º 5
0
 public Gel(Vector2 location)
 {
     RandomStateGenerator = new RandomStateGenerator(this);
     States                = new Dictionary <RandomStateGenerator.StateType, int>(GameData.Instance.EnemyStateWeights.GelStateList);
     Health                = new HealthManager(GameData.Instance.EnemyHealthConstants.GelHealth);
     Physics               = new Physics(location);
     Physics.Mass          = GameData.Instance.EnemyMassConstants.GelMass;
     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.GelDamage;
     DamageTimer           = 0;
     MoveSpeed             = GameData.Instance.EnemySpeedConstants.GelSpeed;
     CurrentTint           = LoZGame.Instance.DefaultTint;
     CurrentState          = new SpawnEnemyState(this);
     AI        = EnemyAI.Gel;
     DropTable = GameData.Instance.EnemyDropTables.EmptyDropTable;
     ApplyDamageMod();
     ApplySmallSpeedMod();
     ApplySmallWeightModPos();
     ApplySmallHealthMod();
 }
Ejemplo n.º 6
0
 public SpikeCross(Vector2 location)
 {
     Health                = new HealthManager(GameData.Instance.EnemyHealthConstants.SpikeCrossHealth);
     Physics               = new Physics(new Vector2(location.X, location.Y));
     Physics.Mass          = GameData.Instance.EnemyMassConstants.SpikeCrossMass;
     Physics.Bounds        = new Rectangle((int)Physics.Location.X, (int)Physics.Location.Y, EnemySpriteFactory.GetEnemyWidth(this), EnemySpriteFactory.GetEnemyHeight(this));
     CurrentState          = new SpawnEnemyState(this);
     EnemyCollisionHandler = new EnemyCollisionHandler(this);
     InitialPos            = Physics.Bounds.Location;
     Expired               = false;
     IsKillable            = false;
     Damage                = GameData.Instance.EnemyDamageConstants.SpikeCrossDamage;
     DamageTimer           = 0;
     CurrentTint           = LoZGame.Instance.DefaultTint;
     //CurrentTint = Color.White;
     AI            = EnemyAI.SpikeCross;
     DropTable     = GameData.Instance.EnemyDropTables.EmptyDropTable;
     IsTransparent = true;
     ApplyDamageMod();
     ApplySmallSpeedMod();
     ApplyLargeWeightModPos();
 }
Ejemplo n.º 7
0
 public ManhandlaBody(Vector2 location)
 {
     RandomStateGenerator = new RandomStateGenerator(this);
     States                = new Dictionary <RandomStateGenerator.StateType, int>(GameData.Instance.EnemyStateWeights.ManhandlaBodyStateList);
     Health                = new HealthManager(GameData.Instance.EnemyHealthConstants.ManhandlaBodyHealth);
     Physics               = new Physics(location);
     Physics.Mass          = GameData.Instance.EnemyMassConstants.DragonMass;
     Physics.IsMovable     = false;
     Physics.Bounds        = new Rectangle((int)Physics.Location.X, (int)Physics.Location.Y, EnemySpriteFactory.GetEnemyWidth(this), EnemySpriteFactory.GetEnemyHeight(this));
     MoveSpeed             = GameData.Instance.EnemySpeedConstants.ManhandlaMinSpeed;
     CurrentState          = new IdleEnemyState(this);
     EnemyCollisionHandler = new EnemyCollisionHandler(this);
     Expired               = false;
     IsTransparent         = true;
     Damage                = GameData.Instance.EnemyDamageConstants.DragonDamage;
     DamageTimer           = 0;
     CurrentTint           = LoZGame.Instance.DefaultTint;
     spawnedChildren       = false;
     AI           = EnemyAI.Manhandla;
     DropTable    = GameData.Instance.EnemyDropTables.ManhandlaDropTable;
     MinMaxWander = new Point(LoZGame.Instance.UpdateSpeed, LoZGame.Instance.UpdateSpeed * 2);
 }
Ejemplo n.º 8
0
 public Ganon(Vector2 location)
 {
     RandomStateGenerator = new RandomStateGenerator(this);
     States                = new Dictionary <RandomStateGenerator.StateType, int>(GameData.Instance.EnemyStateWeights.GanonTeleportingStateList);
     Health                = new HealthManager(GameData.Instance.EnemyHealthConstants.GanonHealth);
     Physics               = new Physics(location);
     Physics.Mass          = GameData.Instance.EnemyMassConstants.GanonMass;
     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;
     Physics.IsMovable     = false;
     visibilityTimer       = LoZGame.Instance.UpdateSpeed;
     Damage                = GameData.Instance.EnemyDamageConstants.GanonDamage;
     DamageTimer           = 0;
     MoveSpeed             = GameData.Instance.EnemySpeedConstants.GanonSpeed;
     CurrentTint           = LoZGame.Instance.DefaultTint;
     DropTable             = GameData.Instance.EnemyDropTables.EmptyDropTable;
     ApplyDamageMod();
     ApplySmallSpeedMod();
     ApplyLargeWeightModPos();
     ApplyLargeHealthMod();
 }
Ejemplo n.º 9
0
 public BlockEnemy(Vector2 location)
 {
     RandomStateGenerator = new RandomStateGenerator(this);
     States = new Dictionary <RandomStateGenerator.StateType, int>()
     {
         { RandomStateGenerator.StateType.Attack, 1 },
         { RandomStateGenerator.StateType.Idle, 5 }
     };
     Health                = new HealthManager(1);
     Physics               = new Physics(location);
     Physics.IsMovable     = false;
     Physics.Mass          = 1;
     Physics.Bounds        = new Rectangle((int)Physics.Location.X, (int)Physics.Location.Y, 1, 1);
     EnemyCollisionHandler = new EnemyCollisionHandler(this);
     Expired               = false;
     IsKillable            = false;
     IsTransparent         = true;
     DamageTimer           = 0;
     AI           = EnemyAI.NoAI;
     DropTable    = GameData.Instance.EnemyDropTables.EmptyDropTable;
     CurrentState = new BlockEnemyIdleState(this);
     CurrentTint  = LoZGame.Instance.DefaultTint;
 }
Ejemplo n.º 10
0
 public DigDoggerInvincible(Vector2 location)
 {
     Physics                  = new Physics(location);
     CurrentState             = new SpawnEnemyState(this);
     States                   = new Dictionary <RandomStateGenerator.StateType, int>(GameData.Instance.EnemyStateWeights.DigDoggerStateList);
     RandomStateGenerator     = new RandomStateGenerator(this);
     Health                   = new HealthManager(GameData.Instance.EnemyHealthConstants.DigDoggerHealth);
     Physics.Mass             = GameData.Instance.EnemyMassConstants.DigDoggerLargeMass;
     Physics.Bounds           = new Rectangle((int)Physics.Location.X, (int)Physics.Location.Y, EnemySpriteFactory.GetEnemyWidth(this), EnemySpriteFactory.GetEnemyHeight(this));
     Physics.CurrentDirection = Physics.Direction.None;
     EnemyCollisionHandler    = new EnemyCollisionHandler(this);
     Expired                  = false;
     Damage                   = GameData.Instance.EnemyDamageConstants.DigDoggerDamage;
     MoveSpeed                = GameData.Instance.EnemySpeedConstants.DigDoggerSpeed;
     CurrentTint              = LoZGame.Instance.DefaultTint;
     IsBossPart               = true;
     AI                = EnemyAI.LargeDigDogger;
     DropTable         = GameData.Instance.EnemyDropTables.EmptyDropTable;
     MinMaxWander      = new Point(GameData.Instance.EnemyMiscConstants.MinDirectionChange, GameData.Instance.EnemyMiscConstants.MaxDirectionChange);
     Physics.IsMovable = false;
     ApplyDamageMod();
     ApplySmallSpeedMod();
     ApplyLargeWeightModPos();
 }