Exemple #1
0
 public Vire(Vector2 location)
 {
     RandomStateGenerator = new RandomStateGenerator(this);
     States                = new Dictionary <RandomStateGenerator.StateType, int>(GameData.Instance.EnemyStateWeights.VireStateList);
     Health                = new HealthManager(GameData.Instance.EnemyHealthConstants.VireHealth);
     Physics               = new Physics(location);
     Physics.Mass          = GameData.Instance.EnemyMassConstants.VireMass;
     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.VireDamage;
     DamageTimer           = 0;
     MoveSpeed             = GameData.Instance.EnemySpeedConstants.VireSpeed;
     CurrentTint           = LoZGame.Instance.DefaultTint;
     AI        = EnemyAI.Vire;
     DropTable = GameData.Instance.EnemyDropTables.VireDropTable;
     ApplyDamageMod();
     ApplySmallSpeedMod();
     ApplySmallWeightModPos();
     ApplySmallHealthMod();
     Physics.Gravity = GameData.Instance.EnemyMiscConstants.VireGravity;
 }
Exemple #2
0
 public DigDogger(Vector2 location, IEnemy parent)
 {
     protectedSelf         = parent;
     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.DigDoggerSmallMass;
     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.DigDoggerDamage;
     DamageTimer           = 0;
     MoveSpeed             = GameData.Instance.EnemySpeedConstants.DigDoggerFleeSpeed;
     CurrentTint           = LoZGame.Instance.DefaultTint;
     AI                = EnemyAI.SmallDigDogger;
     DropTable         = GameData.Instance.EnemyDropTables.DigDoggerDropTable;
     MinMaxWander      = new Point(GameData.Instance.EnemyMiscConstants.MinDirectionChange, GameData.Instance.EnemyMiscConstants.MaxDirectionChange);
     Physics.IsMovable = false;
     ApplyDamageMod();
     ApplyLargeSpeedMod();
     ApplyLargeWeightModPos();
     ApplyLargeHealthMod();
 }
Exemple #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);
 }
Exemple #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;
 }
Exemple #5
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();
 }
Exemple #6
0
 public RedDarknut(Vector2 location)
 {
     RandomStateGenerator = new RandomStateGenerator(this);
     States                = new Dictionary <RandomStateGenerator.StateType, int>(GameData.Instance.EnemyStateWeights.DarknutStateList);
     Health                = new HealthManager(GameData.Instance.EnemyHealthConstants.RedDarknutHealth);
     Physics               = new Physics(location);
     Physics.Mass          = GameData.Instance.EnemyMassConstants.DarknutMass;
     CurrentState          = new SpawnEnemyState(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.RedDarknutDamage;
     DamageTimer           = 0;
     MoveSpeed             = GameData.Instance.EnemySpeedConstants.DarknutSpeed;
     CurrentTint           = LoZGame.Instance.DefaultTint;
     AI        = EnemyAI.Darknut;
     DropTable = GameData.Instance.EnemyDropTables.RedDarknutDropTable;
     ApplyDamageMod();
     ApplySmallSpeedMod();
     ApplyLargeWeightModPos();
     ApplySmallHealthMod();
 }