public GameHandler() { Main.exiting += onExitSave; player = new Player(new Vector2(Terrain.xSize * Terrain.BLOCK_SIZE * Terrain.TILESIZE * 0.5f, Terrain.ySize * Terrain.BLOCK_SIZE * Terrain.TILESIZE * 0.5f), this); screenScale = 2.0f; projectiles = new List<Projectile>(); entities = new List<Entity>(); terrain = new Terrain(); terrain.Generate(player.pos, player.size); hudHealthTexture = Main.content.Load<Texture2D>("healthBar"); hudCooldownTexture = Main.content.Load<Texture2D>("cooldownBar"); hudBackground = Main.content.Load<Texture2D>("hudBackground"); drawDebug = false; //Screen = new TextScreen(Main.content.Load<Texture2D>("welcomeScreen")); //selectedEnemy = new AnimatedTexture(Main.content.Load<Texture2D>("selectedTargetTest"),2,1.0f/30,14,16); //selectedEnemySize = new Vector2(selectedEnemy.w, selectedEnemy.h); //loadedChunks = new List<List<List<Tiles>>>(); outlineShader = Main.content.Load<Effect>("OutlineShader"); maskStencil = new DepthStencilState { StencilEnable = true, StencilFunction = CompareFunction.Always, StencilPass = StencilOperation.Replace, ReferenceStencil = 1, DepthBufferEnable = false, }; drawStencil = new DepthStencilState { StencilEnable = true, StencilFunction = CompareFunction.GreaterEqual, StencilPass = StencilOperation.Keep, ReferenceStencil = 0, DepthBufferEnable = false, }; blendTransparent = new BlendState { ColorWriteChannels = ColorWriteChannels.None }; alphaTest = new AlphaTestEffect(Main.graphicsManager.GraphicsDevice) { Projection = Matrix.CreateOrthographicOffCenter(0, Main.graphicsManager.GraphicsDevice.PresentationParameters.BackBufferWidth, Main.graphicsManager.GraphicsDevice.PresentationParameters.BackBufferHeight, 0, 0, 1) }; }
public SpellContainer(Player player) { this.player = player; spell = new Spell(null, null, null, null); arrowTexture = Main.content.Load<Texture2D>("Arrows"); }
public float getHeal(Player caster) { return (modElement.healAdd + modTop.healAdd + modBottom.healAdd) * shape.potencyMult; }
public SkillHandler(GameHandler game, Player player) { this.game = game; background = Main.content.Load<Texture2D>("skillTree"); this.player = player; }