Ejemplo n.º 1
0
 public override void Collision(GameObjectCollidable goc)
 {
     if(goc as Player != null)
     {
         DeleteFlag = true;
         omReference.UnregisterObject(this);
     }
     base.Collision(goc);
 }
Ejemplo n.º 2
0
 public override void Collision(GameObjectCollidable goc)
 {
     if (goc as Player != null)
     {
         DeleteFlag = true;
         omReference.UnregisterObject(this);
     }
     base.Collision(goc);
 }
Ejemplo n.º 3
0
        public override void Collision(GameObjectCollidable goc)
        {
            if (goc as Vortex != null)
            {
                dead = true;
                return;
            }
            if (goc as Star != null)
            {
                StarsCollected++;
                //System.Console.Write("Star collision");

                soundeffectinstance.Volume = 0.9f;
                soundeffectinstance.Play();

                return;
            }
        }
Ejemplo n.º 4
0
        public override void Collision(GameObjectCollidable goc)
        {
            if(goc as Vortex != null)
            {
                dead = true;
                return;
            }
            if(goc as Star != null)
            {
                StarsCollected++;
                //System.Console.Write("Star collision");

                soundeffectinstance.Volume = 0.9f;
                soundeffectinstance.Play();

                return;
            }
        }
 /// <summary>
 /// Register an object for collision detection.
 /// </summary>
 /// <param name="goc">The object to register..</param>
 public void RegisterObject(GameObjectCollidable goc)
 {
     collidables.Add(goc);
 }
Ejemplo n.º 6
0
 /// <summary>
 /// Register an object for collision detection.
 /// </summary>
 /// <param name="goc">The object to register..</param>
 public void RegisterObject(GameObjectCollidable goc)
 {
     collidables.Add(goc);
 }
 /// <summary>
 /// This function does not implement any collision data, as it wouldn't know
 /// what to do if it crashed with something!
 /// </summary>
 /// <param name="goc">The object the called object was hit by</param>
 public virtual void Collision(GameObjectCollidable goc)
 {
 }
 /// <summary>
 /// This function does not implement any collision data, as it wouldn't know
 /// what to do if it crashed with something!
 /// </summary>
 /// <param name="goc">The object the called object was hit by</param>
 public virtual void Collision(GameObjectCollidable goc)
 {
 }