Esempio n. 1
0
        protected override void OnCollisionEnter(Collision collision)
        {
            if (collision.IsPlayer())
            {
                GlobalVariables.Player.SetMaterialColors(CurrentMaterial);

                Hide();

                SoundManager.PlaySoundEffect("SpecialItemHit");

                GameDirector.AddScore(HitPoints);
            }
        }
Esempio n. 2
0
        protected override void OnCollisionEnter(Collision collision)
        {
            if (collision.IsPlayer())
            {
                GlobalVariables.Player.ActivateDoubleJumpAbility();

                Hide();

                SoundManager.PlaySoundEffect("SpecialItemHit");

                GameDirector.AddScore(HitPoints);
            }
        }
Esempio n. 3
0
        protected override void OnCollisionEnter(Collision collision)
        {
            if (collision.IsPlayer())
            {
                if (CurrentMaterialName == GlobalVariables.Player.CurrentMaterialName)
                {
                    GameDirector.DoEffects("ObstacleHit", CurrentMaterial);

                    Hide();

                    GameDirector.AddScore(HitPoints);
                }
                else
                {
                    GlobalVariables.Player.Death();
                }
            }
        }