コード例 #1
0
        public override void OnCollision(UTGameObject other)
        {
            Coleccionable col   = other as Coleccionable;
            Enemigos      enemi = other as Enemigos;

            if (col != null)
            {
                col.Destroy();
                Destroy();
            }
            if (enemi != null)
            {
                enemi.Destroy();
                Destroy();
            }
        }
コード例 #2
0
        public override void OnCollision(UTGameObject other)
        {
            Coleccionable col   = other as Coleccionable;
            Enemigos      enemi = other as Enemigos;

            if (col != null)
            {
                col.Destroy();
                Destroy();
                plonk.Play();
                Game1.pantalla = GameState.Final;
                new Escena3();
            }
            if (enemi != null)
            {
                enemi.Destroy();
                Destroy();
                plonk.Play();
                Game1.pantalla = GameState.Final;
                new Escena3();
            }
        }