public void Draw(SpriteBatch sB) { _BackGround.Draw(sB); //Draw Background first foreach (Enemy enemy in EnemyList) { enemy.Draw(sB); } BossAi.Draw(sB); player.Draw(sB); foreach (BasicItem WepUp in WepUpList) { WepUp.Draw(sB); } foreach (BasicItem OneUp in OneUpList) { OneUp.Draw(sB); } //Draw GUI last gui.Draw(sB); }
public void OnGetOneUp() { AudioManagerSingleton.Instance.PlaySe(AudioManagerSingleton.Audio.OneUp); gotOneUpCount++; AddNewBall().StartMove(AdditionalBallStartForce(), titleConstData.MaxVelocity); oneUp = null; }
void CreateNewOneUp() { if (oneUp != null) { return; } oneUp = Instantiate(oneUpPrefab); oneUp.Initialize(this, NewItemsPosition()); }
public void Initialize() { IGameObject Mushroom = new Mushroom(DefaultSpawn); IGameObject FireFlower = new FireFlower(DefaultSpawn); IGameObject Coin = new Coin(DefaultSpawn); IGameObject OneUp = new OneUp(DefaultSpawn); IGameObject Star = new Star(DefaultSpawn); AllItems.Add(Mushroom); AllItems.Add(FireFlower); AllItems.Add(Coin); AllItems.Add(OneUp); AllItems.Add(Star); }
public void StartGame(Level level, TitleConstData titleConstData) { this.level = level; this.titleConstData = titleConstData; scoreDisplay.Score = 0; gotCoinCount = 0; gotOneUpCount = 0; if (level == Level.Expert) { scoreDisplay.Score = titleConstData.ExpertInitialScore; gotCoinCount = titleConstData.ExpertInitialGotCoinCount; } foreach (var vertex in vertexes) { vertex.ResetColor(); } selectedVertex = null; balls = new List <Ball>(); AddNewBall(); if (wall != null) { Destroy(wall.gameObject); wall = null; } if (coin != null) { Destroy(coin.gameObject); coin = null; } if (oneUp != null) { Destroy(oneUp.gameObject); oneUp = null; } var startCountdownView = Instantiate(startCountdownViewPrefab, guideCanvas.transform); startCountdownView.Initialize(() => { balls[0].StartMove(FirstBallStartForce(), titleConstData.MaxVelocity); AudioManagerSingleton.Instance.PlayBgm(); }); }