public override void Collision(GameObjectCollidable goc) { if(goc as Player != null) { DeleteFlag = true; omReference.UnregisterObject(this); } base.Collision(goc); }
public override void Collision(GameObjectCollidable goc) { if (goc as Player != null) { DeleteFlag = true; omReference.UnregisterObject(this); } base.Collision(goc); }
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; } }
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); }
/// <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) { }