/// <summary> /// /// </summary> /// <param name="world"></param> /// <param name="texture"></param> /// <param name="size"></param> /// <param name="startPosition"></param> /// <param name="mass"></param> /// <param name="wheelSize"></param> /// <param name="game"></param> /// <param name="behaviors"></param> /// <param name="userdata"></param> public AI(World world, Texture2D texture, Vector2 size, Vector2 startPosition, float mass, float wheelSize, Game1 game, Behavior behaviors, string userdata) : base(world, texture, size, mass, startPosition, game, userdata) { //Load(texture, 2, 11, 1,0); torso.body.CollisionCategories = Category.Cat2; speed = 0.5f; //jumpForce = new Vector2(0, -5f); Load(texture, 2, 5, 1, 1); direction = Direction.Right; lastCheck = DateTime.Now; //not used yet OnGround = true; //sets behavior for this AI switch (behaviors) { case Behavior.Patrol: behaviorDel = Patrol; damage = 34; break; case Behavior.PatrolDistance: behaviorDel = PatrolDistance; damage = 40; break; case Behavior.Turret: fireRate = 0.08f; enemyHP += 100; behaviorDel = Turret; damage = 45; Load(texture, 1, 8, 1, 0); break; case Behavior.Boss: Load(texture, 2, 7, 60, 1); fireRate = 0.5f; enemyHP = 1512; jumpForce = new Vector2(0, -21); behaviorDel = Boss; jumpInterval = 2f; direction = Direction.Left; damage = 70; speed = 0.5f; atSpawn = true; break; case Behavior.None: behaviorDel = None; break; } this.behaviors = behaviors; //test (leave in peace) bossRay = game.Content.Load<Texture2D>("ProgressBar"); bossRectRay = new Rectangle((int)wheel.Position.X, (int)wheel.Position.Y, 20, 20); }
public Drops(Game1 game, World world, Player player) { ethanolTexture = game.Content.Load<Texture2D>("Flask"); hpTexture = game.Content.Load<Texture2D>("MedKit"); ethanolBox = new DrawableGameObject(world, ethanolTexture, new Vector2(32, 32), 1, "athyl", 0); hpBox = new DrawableGameObject(world, hpTexture, new Vector2(32, 32), 1, "hpBox", 0); //ethanolBox.body.OnCollision += PickupsForPlayer; //hpBox.body.OnCollision += PickupsForPlayer; ethanolBox.body.OnCollision += new OnCollisionEventHandler(PickupsForPlayer); hpBox.body.OnCollision += new OnCollisionEventHandler(PickupsForPlayer); hpBox.body.FixedRotation = true; ethanolBox.body.FixedRotation = true; this.playerz = player; this.gamez = game; this.world = world; ethanolBox.body.BodyType = BodyType.Dynamic; hpBox.body.BodyType = BodyType.Dynamic; ethanolDrop = false; hpDrop = false; //ethanolBox.body.IgnoreCollisionWith(player.torso.body); //hpBox.body.IgnoreCollisionWith(player.torso.body); //hpBox.body.IgnoreCollisionWith(player.wheel.body); //ethanolBox.body.IgnoreCollisionWith(player.wheel.body); hpBox.body.SleepingAllowed = false; ethanolBox.body.SleepingAllowed = false; hpBox.body.Friction = 100f; ethanolBox.body.Friction = 100f; }
public Projectile(Game1 game) { this.game = game; bulletLifeTime = 10.0f; meleeBulletLifeTime = 0.5f; FireLifeTime = 1.0f; }
public Projectile(Game1 game, Player player) { this.game = game; this.player = player; bulletLifeTime = 10.0f; meleeBulletLifeTime = 0.5f; FireLifeTime = 1.0f; }
public Bullet(DrawableGameObject Obj, float Damage, Game1 game, World world, float LifeTime) { this.Obj = Obj; this.Damage = Damage; this.game = game; this.world = world; this.WasFired = Game1.runTime; this.LifeTime = LifeTime; }
/// <summary> /// The main entry point for the application. /// </summary> static void Main(string[] args) { //Encryption.ToggleConfigEncryption("Athyl.exe"); using (Game1 game = new Game1()) { //Encryption.ToggleConfigEncryption("Athyl.exe"); game.Run(); } }
public Map(World world, Game1 game) { this.world = world; this.game = game; currentLevel = 1; //Vilken nivå? Ändra mellan 1-3 för att byta utseende på banan. rand = new Random(); progress = 1; InializeMap(); }
public Skilltree(Player playerInfo, Game1 game) { activeSkills = new ActiveSkills(); this.fireRate = 0; this.projectileSpeed = 0.039f; this.damage = 0; this.playerInfo = playerInfo; this.playerLevel = playerInfo.playerLevel; this.maxHp = 100; //Set Hp and Athyl on player this.maxAthyl = 500; //this.playerMaxAthyl = this.maxAthyl; //this.playerMaxHP = this.maxHp; firebreathPoint = AtkSpdPoint = AtkDmgPoint = DodgePoint = 0; //Close talentpoints FireBurstPoint = FastShotPoint = AthylPoint = PassthroughPoint = 0; //Mid talentpoints ShieldPoint = KevlarPoint = AimPoint = ShieldCDPoint = 0; //Long talentpoints DodgePoint = PassthroughPoint = KevlarPoint = AimPoint = ShieldCDPoint = 5; //Skills that are still under construction! //Set default values for melee meleeFireRate = 0.3f; meleeMoveSpd = 1.4f; meleeDmg = 75; meleeJmpHeight = new Vector2(0, -28.0f); meleeEthanolConsumption = 0; meleePlayerDmg = 0.5f; meleeMaxAthyl = maxAthyl; //Set default values for melee midFireRate = 0.13f; midMoveSpd = 1.4f; midDmg = 50; midJmpHeight = new Vector2(0, -26.6f); midEthanolConsumption = 2; midPlayerDmg = 0.75f; midMaxAthyl = maxAthyl; //Set default values for melee longFireRate = 0.7f; longMoveSpd = 0.8f; longDmg = 200; longJmpHeight = new Vector2(0, -23.1f); longEthanolConsumption = 10; longPlayerDmg = 1.0f; longMaxAthyl = maxAthyl; }
public ActiveSkills(World world, Game1 game, Player player, Player.Direction direction) { this.shieldTexture = game.Content.Load<Texture2D>("Projectiles/Shield"); this.direction = direction; this.player = player; this.world = world; this.shieldHP = (int)((player.skillTree.playerInfo.playerHP / 10) * player.skillTree.ShieldPoint); this.shieldDuration += 2 * player.skillTree.ShieldPoint; this.shieldCooldown -= 4 * player.skillTree.ShieldCDPoint; shieldGfx = new DrawableGameObject(world, shieldTexture, new Vector2(shieldTexture.Width, shieldTexture.Height), 90, "shield"); if (direction == Player.Direction.Right) { shieldGfx.Position = new Vector2(player.torso.Position.X + shieldGfx.texture.Width * 1.5f, player.torso.Position.Y); } else { shieldGfx.Position = new Vector2(player.torso.Position.X - shieldGfx.texture.Width * 1.5f, player.torso.Position.Y); } shieldGfx.body.FixedRotation = true; shieldGfx.body.BodyType = BodyType.Dynamic; }
public Sounds(Game1 game) { this.game = game; }