Example #1
0
        public override void Update(GameTime gameTime)
        {
            if (LifeTimer.Elapsed)
            {
                Enabled = false;
            }

            if (PO.CheckPlayBorders(new Vector2(110, 83), Vector2.One))
            {
                Enabled = false;
            }

            ShieldRef.CheckColusion(this);

            base.Update(gameTime);
        }
Example #2
0
        void CheckCollusion()
        {
            if (PO.CheckPlayBorders(new Vector2(110, 83), Vector2.One))
            {
                Reset();
                return;
            }

            if (LogicRef.PlayerRef.Enabled)
            {
                if (Sphere.Intersects(LogicRef.PlayerRef.Sphere))
                {
                    Reset();
                    LogicRef.LoseLife();
                }
            }
        }