public void SelectedEnemySpawnPoint(HUD invoker) { _3DGameObject enemyMaker = new _3DGameObject(); enemyMaker.Tag = "EnemySpawnPoint"; enemyMaker.renderer = new BillboardRenderer(Game.Content.Load <Texture2D>(@"Sprites\EnemySpawnPoint")); enemyMaker.AddComponent(enemyMaker.renderer); enemyMaker.collider = new Collider(new BoundingBox(new Vector3(-0.5f, 0, -0.5f), new Vector3(0.5f, 1, 0.5f))); enemyMaker.AddComponent(new SelectPointController()); enemyMaker.transformation.ScaleMatrix = Matrix.CreateScale(5); Game.Components.Add(enemyMaker); }
public void SelectPlayerStartPoint(HUD invoker) { if (playerStartPointMaker != null && Game.Components.Contains(playerStartPointMaker)) { Game.Components.Remove(playerStartPointMaker); } playerStartPointMaker = new _3DGameObject(); playerStartPointMaker.Tag = "PlayerStartPoint"; playerStartPointMaker.renderer = new BillboardRenderer(Game.Content.Load <Texture2D>(@"Sprites\PlayerStartPoint")); playerStartPointMaker.AddComponent(playerStartPointMaker.renderer); playerStartPointMaker.collider = new Collider(new BoundingBox(new Vector3(-0.5f, 0, -0.5f), new Vector3(0.5f, 1, 0.5f))); playerStartPointMaker.AddComponent(new SelectPointController()); playerStartPointMaker.transformation.ScaleMatrix = Matrix.CreateScale(5); Game.Components.Add(playerStartPointMaker); }