public override void OnInspectorGUI() { DrawDefaultInspector(); //Get script reference levelCreator = (LevelCreator)target; //Toggle placeMode = GUILayout.Toggle(placeMode, "Place Mode"); //Selected prefab label EditorGUILayout.HelpBox("Selected prefab: " + (levelCreator.selectedPrefab == null ? "NULL" : (levelCreator.selectedPrefab.gameObject.name)), MessageType.Info); //TileObject buttons GUILayout.Label("TileObject Palette"); for (int i = 0; i < levelCreator.tileObjectPalette.Count; i++) { if (GUILayout.Button(levelCreator.tileObjectPalette[i].gameObject.name)) { int val = 0 + i; levelCreator.selectedPrefab = levelCreator.tileObjectPalette[val]; } } //Environment tile buttons GUILayout.Label("Environment Palette"); for (int i = 0; i < levelCreator.environmentTilePalette.Count; i++) { if (GUILayout.Button(levelCreator.environmentTilePalette[i].gameObject.name)) { int val = 0 + i; levelCreator.selectedPrefab = levelCreator.environmentTilePalette[val]; } } }
private static void Main() { while (true) { var map = LevelSwitcher.GetNextLevel(); var test = new Player(); if (!Game.IsOver) { Game.Map = LevelCreator.CreateMap(map); Application.Run(new GameWindow()); } else { break; } } End(); void End() { if (!Game.IsOver) { return; } var name = Interaction.InputBox("Enter your name", "Succes", "", -1, -1); RecordTable.AddRecord(name, Game.MovesCount); MessageBox.Show(RecordTable.GetTopFive(), "Records", MessageBoxButtons.OKCancel); } }
public void Construct(LevelCreator levelCreator, GameWatcher gameWatcher) { _levelCreator = levelCreator; _levelCreator.transform.SetParent(transform); _gameWatcher = gameWatcher; _gameWatcher.transform.SetParent(transform); }
private static void Init() { // Get existing open window or if none, make a new one: LevelCreator window = (LevelCreator)EditorWindow.GetWindow(typeof(LevelCreator)); window.Show(); }
public void LevelTbCustomer() { levelCreator = new LevelCreator(); customers = new List <Customer>(); levelCreator.CreateLevel("the-beach.txt"); foreach (var customer in levelCreator.Customer) { Customer cust = new Customer(customer); customers.Add(cust); } Assert.True(customers[0].name == "Bob"); Assert.True(customers[0].SpawnTime == 3); Assert.True(customers[0].StartPlatform == 'J'); Assert.True(customers[0].DropOffPlatform == 'r'); Assert.True(customers[0].dropOffTime == 10); Assert.True(customers[0].dropOffPoints == 100); Assert.True(customers[1].name == "Carol"); Assert.True(customers[1].SpawnTime == 30); Assert.True(customers[1].StartPlatform == 'r'); Assert.True(customers[1].DropOffPlatform == '^'); Assert.True(customers[1].dropOffTime == 10); Assert.True(customers[1].dropOffPoints == 100); }
private void Start() { levelCreator = new LevelCreator(gridSize, maxFloors, noDirectionThreshold, turnLeftThreshold, turnRightThreshold); floorParent = new GameObject("Floor Parent"); wallParent = new GameObject("Wall Parent"); floors = new List <Vector2Int>(); //CreateFloors(); //CreateWalls(); CreateFloorObjects(levelCreator.GetGrid()); Texture2D texture = new Texture2D(64, 64); Color[] colors = texture.GetPixels(); /*for(int i = 0; i< width; i++) * { * for(int j = 0; j < height; j++) * { * if (result[i, j]) * { * Debug.Log("Black"); * colors[i * height + j] = Color.black; * } * else * { * Debug.Log("White"); * colors[i * height + j] = Color.white; * } * } * } * texture.SetPixels(colors); * texture.Apply(); * tempTex = texture;*/ }
public void RemoveWeaponFromPerson() { if (personWhichBelongsTo == null) { return; } Weapon weapon = this.prefab.GetComponent <Weapon>(); if (weapon == null) { return; } Person person = personWhichBelongsTo.Prefab.GetComponent <Person>(); if (person == null) { return; } transform.SetParent(LevelCreator.GetInstance().transform); weapon.SetSortingLayerOfTextureOfWeapon(SortingLayerConstants.ITEM_LAYER_NAME); weapon.SetAnimatorOnFloorFlag(true); personWhichBelongsTo.SetAllCollidersStatus(true); this.personWhichBelongsTo = null; person.Weapon = null; }
void UpdateTile( ) { Debug.Log("We Did a thing..."); LevelCreator lMan = FindObjectOfType <LevelCreator>( ); lMan.UpdateTile(gameObject, GetComponent <SpriteRenderer>( ), tileType); }
static void Main(string[] args) { LevelCreator l = new LevelCreator(); Console.WriteLine(l.map[1, 1].position); Console.ReadKey(); }
public void CustomFormatTest() { const string levelData = @" wwwww wtcp-w wwwww"; var creator = new LevelCreator(new TestLevelFormat()); var level = creator.Create(levelData); Assert.AreEqual(12, level.Walls.Count); Assert.AreEqual(1, level.Targets.Count); Assert.AreEqual(1, level.Crates.Count); Assert.AreEqual(3, level.PlayerX); Assert.AreEqual(1, level.PlayerY); Assert.AreEqual(2, level.Crates.Single().X); Assert.AreEqual(1, level.Crates.Single().Y); Assert.AreEqual(1, level.Targets.Single().Item1); Assert.AreEqual(1, level.Targets.Single().Item2); Assert.AreEqual(6, level.Width); Assert.AreEqual(3, level.Height); }
private void MakeInstance() { if (instance == null) { instance = this; } }
public void BasicTest() { const string step0 = @"#### #-@# #--# ####"; const string step1 = @"#### #@-# #--# ####"; const string step2 = @"#### #--# #@-# ####"; const string step3 = @"#### #--# #-@# ####"; var level = new LevelCreator().Create(step0); TestStep(level, level.TryMoveLeft, step1); TestStep(level, level.TryMoveDown, step2); TestStep(level, level.TryMoveRight, step3); TestStep(level, level.TryMoveUp, step0); }
void Awake() { EnsureMapDirectoryExists(); RegisterStates(); mainCam = Camera.main.gameObject; levelCreator = GameObject.Find("LevelCreator").GetComponent <LevelCreator>(); }
public void BasicTest() { const string levelData = @" ##### #.$@-# #####"; var creator = new LevelCreator(); var level = creator.Create(levelData); Assert.AreEqual(12, level.Walls.Count); Assert.AreEqual(1, level.Targets.Count); Assert.AreEqual(1, level.Crates.Count); Assert.AreEqual(3, level.PlayerX); Assert.AreEqual(1, level.PlayerY); Assert.AreEqual(2, level.Crates.Single().X); Assert.AreEqual(1, level.Crates.Single().Y); Assert.AreEqual(1, level.Targets.Single().Item1); Assert.AreEqual(1, level.Targets.Single().Item2); Assert.AreEqual(6, level.Width); Assert.AreEqual(3, level.Height); }
void Start() { levelCreator = GameObject.FindGameObjectWithTag("LevelCreator").GetComponent <LevelCreator>(); playerStatus = Camera.main.GetComponent <PlayerStatus>(); backgroundMovement = GameObject.FindGameObjectWithTag("Background").GetComponent <BackgroundMovement>(); cloud = GameObject.Find("CloudPlane").GetComponent <JustCloud>(); }
void Awake() { levelCreator = GameObject.Find("LevelCreator").GetComponent <LevelCreator>(); RegisterStateListeners(); RegisterUIListeners(); LevelSerializer.Progress += HandleProgress; }
private void Start() { base.Start(); ui = FindObjectOfType <LevelCreatorUI>(); cam = Camera.main; levelCreator = (LevelCreator)LevelCreator.singleton; }
public void BasicTest() { const string levelData = @" ########## #-------.# #-######-# #------#-# #------#-# #---@--#-# #------#-# #------#-# #--------# ##########"; const string pathData = @" ########## #-------*# #-######*# #------#*# #------#*# #---*--#*# #---*--#*# #---*--#*# #---*****# ##########"; var level = new LevelCreator().Create(levelData); var aStar = new AStarBuilder <Tuple <int, int> >().Neighbors(new TestNeighborsProvider(level)).Build(); var path = aStar.Search(Tuple.Create(level.PlayerX, level.PlayerY), level.Targets.Single()); Assert.NotNull(path); var result = Draw(level, path); Assert.AreEqual(pathData.Trim(), result); }
void Awake() { levelCreator = this.gameObject.GetComponentInParent <LevelCreator>(); trapList = new List <Trap>(); powerUpList = new List <PowerUp>(); tilesList = new List <int>(); tilesObjectsList = new List <GameObject> (); }
public Level(int ID) { levelID = ID; levelCreator = new LevelCreator(ID); _level = levelCreator.GetLevel(); _prop = levelCreator.GetProps(); _coin = levelCreator.GetCoins(); }
void LevelCreationEnter(StateMachine <LevelCreatorStates, LevelCreatorStateMessage> .StateChangeData stateChangeData) { levelCreator = GameObject.Find("LevelCreator").GetComponent <LevelCreator>(); isInFrontMenu = false; NGUITools.SetActive(levelAssetMenuPanel, true); }
static void Init() { lc = GameObject.Find("LevelManager").GetComponent <LevelCreator>(); // Get existing open window or if none, make a new one: Editor window = (Editor)GetWindow(typeof(Editor)); window.Show(); }
// Use this for initialization void Start() { _playerScript = GameObject.Find("Player").GetComponent<PlayerScript>(); ammountOfTime = 5f; speed = 2f; _rewardCreator = GameObject.Find("Main Camera").GetComponent<RewardCreator>(); _levelCreator = GameObject.Find("Main Camera").GetComponent<LevelCreator>(); }
void Awake() { if (_instance == null) { _instance = this; } else { Destroy (this); } }
public LcSaveButton(Game1 game, Vector2 pos, LevelCreator lc) { this.pos = pos; this.game = game; this.lc = lc; bounds = new AABB(pos, 188, 71); checkTex(); }
// Use this for initialization void Start() { this.transform.Rotate(new Vector3(180.0f, 0.0f, 0.0f)); PlayerStatus = GameObject.FindGameObjectWithTag("Player").GetComponent <PlayerStatus>(); level = GameObject.FindWithTag("LevelCreator").GetComponent <LevelCreator>(); keyEmptyInstance = Instantiate(Empty, new Vector3(transform.position.x, transform.position.y + 0.5f, transform.position.z), transform.rotation) as GameObject; }
public void LevelSnS() { levelCreator = new LevelCreator(); levelCreator.CreateLevel("short-n-sweet.txt"); Assert.True(levelCreator.Obstacles.CountEntities() == 173); Assert.True(levelCreator.Platforms.Count == 13); Assert.True(levelCreator.Exits.CountEntities() == 6); Assert.True(levelCreator.playerpos.ToString() == "Vec2F(0,7749998,0,8261199)"); }
public void LevelTb() { levelCreator = new LevelCreator(); levelCreator.CreateLevel("the-beach.txt"); Assert.True(levelCreator.Obstacles.CountEntities() == 253); Assert.True(levelCreator.Platforms.Count == 27); Assert.True(levelCreator.Exits.CountEntities() == 6); Assert.True(levelCreator.playerpos.ToString() == "Vec2F(0,3750001,0,3479497)"); }
private void Start() { _levelCreator = GetComponent <LevelCreator>(); _watcher.Path = Application.dataPath + "/Resources/TextFiles/"; _watcher.Filter = "*.txt"; _watcher.Changed += _levelFileChanged; _watcher.EnableRaisingEvents = true; }
private static void NoMovement(string levelData) { var level = new LevelCreator().Create(levelData); TestStep(level, level.TryMoveLeft, levelData, Assert.IsFalse); TestStep(level, level.TryMoveDown, levelData, Assert.IsFalse); TestStep(level, level.TryMoveRight, levelData, Assert.IsFalse); TestStep(level, level.TryMoveUp, levelData, Assert.IsFalse); }
public static void ShowWindow() { // Instantitate the editor windows when selected on menu or called by shortkeys LevelCreator window = GetWindow <LevelCreator>(); window.titleContent = new GUIContent("LevelCreator"); window.minSize = new Vector2(370, 460); window.maxSize = new Vector2(370, 460); }
// Start is called before the first frame update void Start() { instance = this; nextAttack = 0; bizDostuz = true; bestScore.text = PlayerPrefs.GetInt("BestScore", 0).ToString(); if (alienPrefabs == null) { alienPrefabs = Resources.LoadAll <GameObject>("Prefabs/Aliens"); } float marginX = 1.5f; float marginY = 1.25f; Vector3 origin = new Vector3((float)(width * marginX) / 2f, 0f, 0f); alienInstance = new GameObject[width, height]; for (int y = 0; y < height; y++) { GameObject prefab = alienPrefabs[Random.Range(0, alienPrefabs.Length)]; Material material = alienMaterials[Random.Range(0, alienMaterials.Length)]; prefab.GetComponent <MeshRenderer>().sharedMaterial = material; for (int x = 0; x < width; x++) { Vector3 offset = new Vector3(x * marginX, y * marginY, 0.0f); alienInstance[x, y] = Instantiate(prefab, transform.position + offset - origin, prefab.transform.rotation, transform ); } } //for (int y = -height; y <= height; y++) //{ // GameObject prefab = alienPrefabs[Random.Range(0, alienPrefabs.Length)]; // Material material = alienMaterials[Random.Range(0, alienMaterials.Length)]; // prefab.GetComponent<MeshRenderer>().sharedMaterial = material; // for(int x = -width; x <= width; x++) // { // Vector3 offset = new Vector3(x * 1.5f, y * 1.25f, 0.0f); // Instantiate(prefab, // this.transform.position + offset, // prefab.transform.rotation, // this.transform); // } //} for (int x = -2; x <= 2; x++) { Vector3 offset = new Vector3(x * 5, -2.5f, 0.0f); Instantiate(this.shieldPrefab, offset, this.shieldPrefab.transform.rotation); } }
int type; //0 is x, 1 is y #endregion Fields #region Constructors public LcGridModifier(Game1 game, Vector2 pos, LevelCreator lc, bool add, int type) { this.pos = pos; this.game = game; this.lc = lc; this.add = add; this.type = type; bounds = new AABB(pos, 30, 30); setTex(); }
private void Awake() { if (instance == null) { instance = this; } else if (instance != this) { Destroy(gameObject); } }
public LcTextField(Game1 game, LevelCreator lc, Vector2 pos, string desc) { this.game = game; this.lc = lc; this.desc = desc; this.pos = pos; bounds = new AABB(pos, 300, 30); text = ""; charMax = 16; blinkTime = 0.5f; blinkLine = ""; }
public LevelCreatorController(LevelCreator level) { this.level = level; keyMapping.Add(Keys.W, new CameraPanUp(this.level)); keyMapping.Add(Keys.S, new CameraPanDown(this.level)); keyMapping.Add(Keys.D, new CameraPanRight(this.level)); keyMapping.Add(Keys.A, new CameraPanLeft(this.level)); keyMapping.Add(Keys.Enter, new CursorPlaceCommand(this.level)); keyMapping.Add(Keys.Q, new CreatorQuitCommand(this.level)); keyMapping.Add(Keys.Tab, new ToggleMouseCommand(this.level)); keyMapping.Add(Keys.L, new GenerateLevel(this.level)); }
private static void InitLevels() { TextAsset[] bindata = Resources.LoadAll<TextAsset>("QFrameLevels/"); levels = new List<LevelCreator>(); id = new List<string>(); foreach (TextAsset a in bindata) { LevelCreator lc = new LevelCreator(a.text); levels.Add(lc); id.Add(lc.id); } }
public Stamp(string tag,Texture2D texture,Rectangle hitBox,LevelCreator level, Boolean isBackground = false) { this.texture = texture; this.X = hitBox.X; this.Y = hitBox.Y; this.level = level; this.spriteBatch = level.spriteBatch; this.hitBox = hitBox; isTemplate = true; this.tag = tag; stretchHitBox = hitBox; this.isBackground = isBackground; }
void Awake() { print("GM awake"); screensParent.SetActive(true); canvas = GameObject.Find("Canvas").GetComponent<Canvas>(); invertSpawner = GameObject.Find("InvertSpawner").GetComponent<InvertSpawner>(); levelMover = GameObject.Find("LevelAnchor").GetComponent<LevelMover>(); playerController = GameObject.Find("Player").GetComponent<PlayerController>(); playerJumpTrigger = GameObject.Find("JumpTrigger").GetComponent<CircleCollider2D>(); levelCreator = GameObject.Find("LevelAnchor").GetComponent<LevelCreator>(); countdownScreen = GameObject.Find("CountdownScreen"); countdownText = countdownScreen.transform.GetChild(1).GetComponent<Text>(); gameOverScreen = GameObject.Find("GameOverScreen"); endScoreText = gameOverScreen.transform.GetChild(1).GetComponent<Text>(); bestScoreText = gameOverScreen.transform.GetChild(2).GetComponent<Text>(); pauseScreen = GameObject.Find("PauseScreen"); pauseButton = GameObject.Find("PauseButton"); scoreText = GameObject.Find("ScoreText").GetComponent<Text>(); scoreText.text = ""; countdownScreen.SetActive(false); gameOverScreen.SetActive(false); pauseScreen.SetActive(false); checkpointRespawns = 5; score = 0; paused = false; startSpeed = 10; gameOver = false; playerIsReseting = false; gravityIsDown = true; gravity = new Vector2(0.0f, -9.8f); }
void Start() { level=GameObject.Find ("MainCamera").GetComponent<LevelCreator>(); }
public GenerateLevel(LevelCreator level) { this.level = level; }
public void initializeLevelCreator() { levelCreator = new LevelCreator(this); Components.Add(levelCreator); }
public CameraPanLeft(LevelCreator level) { this.level = level; }
public UILoader(Game1 game, LevelCreator level) { this.game = game; this.level = level; spriteBatch = level.spriteBatch; saveLevelHitBox = new Rectangle(10, 10, 40, 40); font = game.Content.Load<SpriteFont>("actions"); this.background = game.Content.Load<Texture2D>("LevelCreatorSprites/Background"); this.banzaiCannon = game.Content.Load<Texture2D>("LevelCreatorSprites/Banzai Cannon"); this.banzaiCannonRect = new Rectangle((int)LevelLoaderConstants.banzaiCannonPosX, (int)LevelLoaderConstants.banzaiCannonPosY, banzaiCannon.Width, banzaiCannon.Height); level.textureStamps.Add(new Stamp("cannon", banzaiCannon, banzaiCannonRect, level)); this.darkBrickBlock = game.Content.Load<Texture2D>("LevelCreatorSprites/DarkBrickBlockIdle"); this.darkBrickBlockRect = new Rectangle((int)LevelLoaderConstants.darkBrickBlockPosX, (int)LevelLoaderConstants.darkBrickBlockPosY, darkBrickBlock.Width, darkBrickBlock.Height); level.textureStamps.Add(new Stamp("dbrick", darkBrickBlock, darkBrickBlockRect, level)); this.darkFloorBlock = game.Content.Load<Texture2D>("LevelCreatorSprites/DarkFloorBlock"); this.darkFloorBlockRect = new Rectangle((int)LevelLoaderConstants.darkFloorBlockPosX, (int)LevelLoaderConstants.darkFloorBlockPosY, darkFloorBlock.Width, darkFloorBlock.Height); level.textureStamps.Add(new Stamp("dfloor", darkFloorBlock, darkFloorBlockRect, level)); this.brickBlock = game.Content.Load<Texture2D>("LevelCreatorSprites/BrickBlockIdle"); this.brickBlockRect = new Rectangle((int)LevelLoaderConstants.brickBlockPosX, (int)LevelLoaderConstants.brickBlockPosY, brickBlock.Width, brickBlock.Height); level.textureStamps.Add(new Stamp("brick", brickBlock, brickBlockRect, level)); this.floorBlock = game.Content.Load<Texture2D>("LevelCreatorSprites/FloorBlock"); this.floorBlockRect = new Rectangle((int)LevelLoaderConstants.floorBlockPosX, (int)LevelLoaderConstants.floorBlockPosY, floorBlock.Width, floorBlock.Height); level.textureStamps.Add(new Stamp("floor", floorBlock, floorBlockRect, level)); this.goomba = game.Content.Load<Texture2D>("LevelCreatorSprites/goomba_walk"); this.goombaRect = new Rectangle((int)LevelLoaderConstants.goombaPosX, (int)LevelLoaderConstants.goombaPosY, goomba.Width, goomba.Height); level.textureStamps.Add(new Stamp("goomba", goomba, goombaRect, level)); this.koopa = game.Content.Load<Texture2D>("LevelCreatorSprites/Koopa"); this.koopaRect = new Rectangle((int)LevelLoaderConstants.koopaPosX, (int)LevelLoaderConstants.koopaPosY, koopa.Width, koopa.Height); level.textureStamps.Add(new Stamp("koopa", koopa, koopaRect, level)); this.lakitu = game.Content.Load<Texture2D>("LevelCreatorSprites/lakitu_movement"); this.lakituRect = new Rectangle((int)LevelLoaderConstants.lakituPosX, (int)LevelLoaderConstants.lakutuPosY, lakitu.Width, lakitu.Height); level.textureStamps.Add(new Stamp("lakitu", lakitu, lakituRect, level)); this.pyramidBlock = game.Content.Load<Texture2D>("LevelCreatorSprites/pyramidBlock"); this.pyramidBlockRect = new Rectangle((int)LevelLoaderConstants.pyramidBlockPosX, (int)LevelLoaderConstants.pyramidBlockPosY, pyramidBlock.Width, pyramidBlock.Height); level.textureStamps.Add(new Stamp("pyr", pyramidBlock, pyramidBlockRect, level)); this.spiny = game.Content.Load<Texture2D>("LevelCreatorSprites/spiny_walking"); this.spinyRect = new Rectangle((int)LevelLoaderConstants.spinyPosX, (int)LevelLoaderConstants.spinyPosY, spiny.Width, spiny.Height); level.textureStamps.Add(new Stamp("spiny", spiny, spinyRect, level)); this.cloud = game.Content.Load<Texture2D>("LevelCreatorSprites/cloud"); this.cloudRect = new Rectangle((int)LevelLoaderConstants.cloudPosX, (int)LevelLoaderConstants.cloudPosY, BackgroundConstants.cloudDestinationWidth, BackgroundConstants.cloudDestinationHeight); level.textureStamps.Add(new Stamp("cloud", cloud, cloudRect, level, isBackground)); this.fireFlower = game.Content.Load<Texture2D>("LevelCreatorSprites/FireFlowerIdle"); this.fireFlowerRect = new Rectangle((int)LevelLoaderConstants.fireFlowerPosX, (int)LevelLoaderConstants.fireFlowerPosY, fireFlower.Width, fireFlower.Height); level.textureStamps.Add(new Stamp("#", fireFlower, fireFlowerRect, level)); this.coin = game.Content.Load<Texture2D>("LevelCreatorSprites/coinIdle"); this.coinRect = new Rectangle((int)LevelLoaderConstants.coinIdlePosX, (int)LevelLoaderConstants.coinIdlePosY, coin.Width, coin.Height); level.textureStamps.Add(new Stamp("?", coin, coinRect, level)); this.greenMushroom = game.Content.Load<Texture2D>("LevelCreatorSprites/GreenMushroomIdle"); this.greenMushroomRect = new Rectangle((int)LevelLoaderConstants.greenMushroomPosX, (int)LevelLoaderConstants.greenMushroomPosY, greenMushroom.Width, greenMushroom.Height); level.textureStamps.Add(new Stamp("gbrick", greenMushroom, greenMushroomRect, level)); this.redMushroom = game.Content.Load<Texture2D>("LevelCreatorSprites/RedMushroomIdle"); this.redMushroomRect = new Rectangle((int)LevelLoaderConstants.redMushroomPosX, (int)LevelLoaderConstants.redMushroomPosY, redMushroom.Width, redMushroom.Height); level.textureStamps.Add(new Stamp("@", redMushroom, redMushroomRect, level)); this.star = game.Content.Load<Texture2D>("LevelCreatorSprites/StarIdle"); this.starRect = new Rectangle((int)LevelLoaderConstants.starPosX, (int)LevelLoaderConstants.starPosY, star.Width, star.Height); level.textureStamps.Add(new Stamp("$", star, starRect, level)); this.hill = game.Content.Load<Texture2D>("LevelCreatorSprites/hill"); this.hillRect = new Rectangle((int)LevelLoaderConstants.hillPosX, (int)LevelLoaderConstants.hillPosY, BackgroundConstants.hillDestinationWidth/3, BackgroundConstants.hillDestinationHeight/3); level.textureStamps.Add(new Stamp("hill", hill, hillRect, level, isBackground)); this.shine = game.Content.Load<Texture2D>("LevelCreatorSprites/shine"); this.shineRect = new Rectangle((int)LevelLoaderConstants.sunPosX, (int)LevelLoaderConstants.sunPosY, BackgroundConstants.shineDestinationWidth, BackgroundConstants.shineDestinationHeight); level.textureStamps.Add(new Stamp("shine", shine, shineRect, level, isBackground)); this.castle = game.Content.Load<Texture2D>("LevelCreatorSprites/castle"); this.castleRect = new Rectangle((int)LevelLoaderConstants.castlePosX, (int)LevelLoaderConstants.castlePosY, BackgroundConstants.castleDestinationWidth/2, BackgroundConstants.castleDestinationHeight/2); level.textureStamps.Add(new Stamp("castle", castle, castleRect, level, isBackground)); this.flagpole = game.Content.Load<Texture2D>("LevelCreatorSprites/flagpole"); this.flagpoleRect = new Rectangle((int)LevelLoaderConstants.flagPolePosX, (int)LevelLoaderConstants.flagPolePosY, flagpole.Width, flagpole.Height/2); level.textureStamps.Add(new Stamp("pole", flagpole, flagpoleRect, level, isBackground)); this.greenPipe = game.Content.Load<Texture2D>("LevelCreatorSprites/greenPipe"); this.greenPipeRect = new Rectangle((int)LevelLoaderConstants.greenPipePosX, (int)LevelLoaderConstants.greenPipePosY, greenPipe.Width, greenPipe.Height); level.textureStamps.Add(new Stamp("pipe", greenPipe, greenPipeRect, level)); this.mario = game.Content.Load<Texture2D>("LevelCreatorSprites/Mario"); }
// ######################################################################################################### // ################################################################ Simulation Methods and Input // Wird beim Start des Programms ausgeführt void Awake() { levelCreator = GetComponent<LevelCreator>(); }
public void ChangeLevel(LevelCreator level) { this.CurrentLevel = level; this.CurrentLevel.CreateLevel(); }
public CursorPlaceCommand(LevelCreator level) { this.level = level; }
public LcMouseCursor(Game1 game, LevelCreator lc) { this.levelCreator = lc; this.game = game; }
public LcKeyboardListener(Game1 game, LevelCreator lc) { this.game = game; this.lc = lc; pressed = false; }