Esempio n. 1
0
        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);
        }
Esempio n. 2
0
 public void OnGetOneUp()
 {
     AudioManagerSingleton.Instance.PlaySe(AudioManagerSingleton.Audio.OneUp);
     gotOneUpCount++;
     AddNewBall().StartMove(AdditionalBallStartForce(), titleConstData.MaxVelocity);
     oneUp = null;
 }
Esempio n. 3
0
    void CreateNewOneUp()
    {
        if (oneUp != null)
        {
            return;
        }

        oneUp = Instantiate(oneUpPrefab);
        oneUp.Initialize(this, NewItemsPosition());
    }
Esempio n. 4
0
        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);
        }
Esempio n. 5
0
    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();
        });
    }