public LandActiveBox(Land land, World world, Point size) : base(world, new Camera(size.X - 10, size.Y - 10, land)) { border = new DrawableTexture("whiteSquare", this); border.size.X = size.X; border.size.Y = size.Y; border.filter = Color.Black; border.layer = 0.501f; texture.layer = 0.5f; }
public LandRat(Land land, int seed, Rat creature) : base(creature, land) { Random rdm = new Random(seed); texture = new DrawableTexture("whiteSquare", this); texture.size = new Vector2(10f, 10f); texture.filter = Color.Black; texture.rotation = (float)(rdm.NextDouble() * Math.PI * 2f); }
public Town(Land land, int ID) : base(land) { this.ID = ID; texture = new DrawableTexture("whiteSquare", this); texture.filter = Color.Orange; texture.layer = 0.95f; label = new DrawableText(AssetManager.getAssetSpriteFont("townLabelFont"), this, "Town " + ID, Color.White); label.layer = 0.949f; }
public MapPreviewer(World world, Land land, Vector2 size) : base(world) { Texture2D textureBase = land.getMinimap(new Point((int)size.X, (int)size.Y)); AssetTexture text = new AssetTexture(textureBase, "minimapTexture"); minimap = new DrawableTexture(text, this); minimap.size = size; }
public MapPreviewer(World world, Land land, Vector2 size) : base(world) { Texture2D textureBase = land.getMinimap(new Point((int)size.X,(int)size.Y)); AssetTexture text = new AssetTexture(textureBase, "minimapTexture"); minimap = new DrawableTexture(text, this); minimap.size = size; }
/// <summary> /// A constructor which takes the world the ActiveBox will be displayed in plus Camera specifications. /// </summary> /// <param name="activeBoxWorld">The world the ActiveBox will be displayed in.</param> /// <param name="targetWorld">The world the camera displayed will draw.</param> /// <param name="cameraWidth">The width of the backbuffer of the camera.</param> /// <param name="cameraHeight">The heifht of the backbuffer of the camera.</param> public ActiveBox(World activeBoxWorld, World targetWorld, int cameraWidth, int cameraHeight) : base(activeBoxWorld) { currentID++; ID = currentID; reDrawing = true; this.camera = new Camera(cameraWidth, cameraHeight, targetWorld); AssetTexture textureAsset = AssetManager.CreateAssetTexture("ActiveBoxText" + ID, camera.backbuffer); texture = new DrawableTexture(textureAsset, this); }
/// <summary> /// A constructor which takes the world the ActiveBox will be displayed in and the Camera which will be displayed. /// </summary> /// <param name="world">The world the ActiveBox is going to be displayed im.</param> /// <param name="camera">The camera the ActiveBox will display the texture of.</param> public ActiveBox(World world, Camera camera) : base(world) { currentID++; ID = currentID; this.camera = camera; this.reDrawing = true; AssetTexture textureAsset = AssetManager.CreateAssetTexture("ActiveBoxText" + ID, camera.backbuffer); texture = new DrawableTexture(textureAsset , this); }
public LandManager(GameManager gameManager) : base(gameManager.world) { state = LandManagerState.idle; this.gameManager = gameManager; background = new DrawableTexture("whiteSquare", this); background.size = UserInterfaceManager.getDiagonalOnWorld(); background.filter = Color.Black; background.layer = 1f; }
/// <summary> /// A constructor which takes the world the ActiveBox will be displayed in and the Camera which will be displayed. /// </summary> /// <param name="world">The world the ActiveBox is going to be displayed im.</param> /// <param name="camera">The camera the ActiveBox will display the texture of.</param> public ActiveBox(World world, Camera camera) : base(world) { currentID++; ID = currentID; this.camera = camera; this.reDrawing = true; AssetTexture textureAsset = AssetManager.CreateAssetTexture("ActiveBoxText" + ID, camera.backbuffer); texture = new DrawableTexture(textureAsset, this); }
public LandLoadPreviewer(World world, Land loadingLand) : base(world) { this.loadingLand = loadingLand; AssetSpriteFont font = AssetManager.CreateAssetSpriteFont("landLoaderFont", "defaultFont"); statusText = new DrawableText(font, this, "", Color.White); statusBar = new DrawableTexture("whiteSquare", this); statusBar.size = new Vector2(20f, 10f); statusBar.position = new Vector2(0f, 30f); }
public Encounter(LandCreature anchor, Land land) : base(land) { this.anchor = anchor; physicalProperties = new LandPhysicalProperties(); physicalProperties.activelyColliding = true; physicalProperties.collisionType = LandCollisionTypes.Static; physicalProperties.radius = encounterRadius; Dummy = new DrawableTexture("whiteCircle100x100", this); Dummy.size = new Vector2(100f, 100f); Dummy.filter = Color.Transparent; Dummy.layer = 0.98f; }
public LandHumanPlayer(Land world, HumanPlayer human, GameManager gameManager) : base(world, human) { this.gameManager = gameManager; guy = new DrawableTexture("whiteSquare", this); guy.size.X = 10f; guy.size.Y = 10f; encounterTrigger.encounterHandlers += CreatureEncountered; physicalProperties = new LandPhysicalProperties(); physicalProperties.activelyColliding = true; physicalProperties.radius = 10f; physicalProperties.collisionType = LandCollisionTypes.Solid; }
public LandHumanPlayer(Land world, HumanPlayer human, GameManager gameManager) : base(world,human) { this.gameManager = gameManager; guy = new DrawableTexture("whiteSquare", this); guy.size.X = 10f; guy.size.Y = 10f; encounterTrigger.encounterHandlers += CreatureEncountered; physicalProperties = new LandPhysicalProperties(); physicalProperties.activelyColliding = true; physicalProperties.radius = 10f; physicalProperties.collisionType = LandCollisionTypes.Solid; }
public TerrainTile(TerrainType type, Vector2 position, Vector2 size, Land land, int seed) : base(land) { this.position = position; this.land = land; this.seed = seed; terrainTexture = AssetManager.getAssetTexture("whiteSquare").createAssetCopy("terrain"); texture = new DrawableTexture(terrainTexture, this); texture.size = size; texture.layer = 1f; this.size = size; textureLoaded = false; loadingTexture = false; }
public MainMenu(GameManager manager) : base(manager.world) { this.manager = manager; entries.Add(new QuitGame(manager)); entries.Add(new StartGame(manager)); entries[0].position = new Vector2(0, 100); entries[1].position = new Vector2(0, -100); background = new DrawableTexture("whiteSquare", this); background.size = UserInterfaceManager.getDiagonalOnWorld(); background.filter = Color.Black; background.layer = 1f; }
public TerrainTile(TerrainType type, Vector2 position, Vector2 size, Land land, int seed) : base(land) { this.position = position; this.land = land; this.seed = seed; terrainTexture = AssetManager.getAssetTexture("whiteSquare").createAssetCopy("terrain"); texture = new DrawableTexture(terrainTexture , this); texture.size = size; texture.layer = 1f; this.size = size; textureLoaded = false; loadingTexture = false; }
public Mountain(int seed, Land world, float radius) : base(world) { this.seed = seed; assetTexture = AssetManager.getAssetTexture("whiteSquare").createAssetCopy("mountainTexture"); texture = new DrawableTexture(assetTexture, this); Random rdm = new Random(seed); texture.rotation = (float)rdm.NextDouble() * (float)Math.PI * 2f; this.radius = radius; //radius = MathHelper.Clamp(MathHelper.getNextNormalDistributedFloat(3f, 1f, rdm) * 50f, 30f, 500f); texture.size = new Vector2(radius*2f, radius*2f); texture.layer = 0.07f; textureLoaded = false; loadingTexture = false; }
public Mountain(int seed, Land world, float radius) : base(world) { this.seed = seed; assetTexture = AssetManager.getAssetTexture("whiteSquare").createAssetCopy("mountainTexture"); texture = new DrawableTexture(assetTexture, this); Random rdm = new Random(seed); texture.rotation = (float)rdm.NextDouble() * (float)Math.PI * 2f; this.radius = radius; //radius = MathHelper.Clamp(MathHelper.getNextNormalDistributedFloat(3f, 1f, rdm) * 50f, 30f, 500f); texture.size = new Vector2(radius * 2f, radius * 2f); texture.layer = 0.07f; textureLoaded = false; loadingTexture = false; }
public Tree(int seed, float radius, Land world) : base(world) { Random rdm = new Random(seed); drawTexture = new DrawableTexture(world.getTextureForTree(radius),this); //texture.filter = Color.ForestGreen; drawTexture.size = Vector2.One * radius*2f; drawTexture.layer = 0.05f; drawTexture.rotation = (float)rdm.NextDouble() * 2f * (float)Math.PI; this.radius = radius; oscilation += (float)rdm.NextDouble()*(float)Math.PI*2f; shadowTexture = new DrawableTexture(world.getTextureForTree(radius), this); shadowTexture.size = Vector2.One * radius * 2f * 1.1f; shadowTexture.layer = 0.1f; shadowTexture.rotation = drawTexture.rotation; shadowTexture.filter = Color.Lerp(Color.Transparent,Color.Black, 0.9f); physicalProperties = new LandPhysicalProperties(); physicalProperties.activelyColliding = false; physicalProperties.collisionType = LandCollisionTypes.Static; physicalProperties.radius = 2f; }
public Tree(int seed, float radius, Land world) : base(world) { Random rdm = new Random(seed); drawTexture = new DrawableTexture(world.getTextureForTree(radius), this); //texture.filter = Color.ForestGreen; drawTexture.size = Vector2.One * radius * 2f; drawTexture.layer = 0.05f; drawTexture.rotation = (float)rdm.NextDouble() * 2f * (float)Math.PI; this.radius = radius; oscilation += (float)rdm.NextDouble() * (float)Math.PI * 2f; shadowTexture = new DrawableTexture(world.getTextureForTree(radius), this); shadowTexture.size = Vector2.One * radius * 2f * 1.1f; shadowTexture.layer = 0.1f; shadowTexture.rotation = drawTexture.rotation; shadowTexture.filter = Color.Lerp(Color.Transparent, Color.Black, 0.9f); physicalProperties = new LandPhysicalProperties(); physicalProperties.activelyColliding = false; physicalProperties.collisionType = LandCollisionTypes.Static; physicalProperties.radius = 2f; }
public FightCreature(Creature creature, FightWorld fight) : base(fight) { texture = new DrawableTexture(creature.getFightTexture(), this); texture.size.X = 30f; }
public Dummy(World world, AssetTexture texture) : base(world) { this.texture = new DrawableTexture(texture, this); }
public Dummy(World world, String texture) : base(world) { this.texture = new DrawableTexture(AssetManager.getAssetTexture(texture), this); }