Exemplo n.º 1
0
    void AddDie()
    {
        BombManager.GetInstance().CreateBomb(BombType.BombType_1, this.transform.position);

        if (MusicManager.GetInstance().SFXCtrl != null)
        {
            MusicManager.GetInstance().SFXCtrl.PlaySound(SoundType.Sound_EnemyBomb);
        }

        Destroy(this.gameObject);
    }
Exemplo n.º 2
0
        private static void InitializeWithScene()
        {
            PlayerRenderer = CommonUtils.GetComponentInGameObjectFoundWithTagOrPanic <MeshInstanceRendererComponent>(
                BombariaTags.PLAYER,
                CommonUtils.GetComponentPostCommand.DestroyGameObject)
                             .Value;

            BombManager = BombManager.GetInstance();

            NewGame();
        }
Exemplo n.º 3
0
    void Update()
    {
        if (!CanFly)
        {
            return;
        }
        Vector2 dir = new Vector2(1.0f, 0.0f);

        dir.Normalize();
        transform.localPosition = transform.localPosition + (new Vector3(dir.x, 0, 0) * Speed * Time.deltaTime);

        if (transform.localPosition.x >= 0.0f)
        {
            BombManager.GetInstance().CreateBomb(BombType.BombType_PlayerBomb, new Vector2(this.transform.position.x, this.transform.position.y));
            if (MusicManager.GetInstance().SFXCtrl != null)
            {
                MusicManager.GetInstance().SFXCtrl.PlaySound(SoundType.Sound_BigBomb);
            }
            Destroy(this.gameObject);
        }
        //
    }