public CGameObject() { m_pUpdateData = new UpdateData(); m_pRenderData = new RenderData(); m_pParent = null; nId = -1; }
/// <summary> /// Adds a new object to the objectList /// </summary> /// <param name="newObject">The new object to be added to the objectList</param> public void AddObject(CGameObject newObject) { // don't add nothing if (newObject == null) return; // no duplicates if (objectList.Contains(newObject)) return; // Add object to objectList newObject.setListID(objectList.Count); objectList.AddLast(newObject); }
public CSpreadShot(CGameObject parent) : base(parent) { }
public HomingMissileShot(CGameObject parent) : base(parent) { }
public LaserPattern(CGameObject parent) : base(parent) { }
public CLaserShot(CGameObject parent) : base(parent) { }
public HomingMissilePattern(CGameObject parent) : base(parent) { }
public RicochetPattern(CGameObject parent) : base(parent) { }
public CBaseWeapon(CGameObject parent) : base() { m_pParent = parent; m_pBulletPattern = new BaseBulletPattern(this); }
public SpreadPattern(CGameObject parent) : base(parent) { }
public override void HandleCollision(CGameObject gameObject) { base.HandleCollision(gameObject); }
public BaseBulletPattern(CGameObject parent) : base() { m_pParent = parent; }
/// <summary> /// Removes the specified object. /// </summary> /// <param name="removeObject">The object to remove</param> public void RemoveObject(CGameObject removeObject) { // don't remove nothing if (removeObject == null) return; // Find the object to remove LinkedListNode<CGameObject> current = objectList.Find(removeObject); // If object wasn't found, leave. if (current == null) return; // Set objects after the object to be removed to the correct listIndex. for (; current.Value.Equals(null) == false; current = current.Next) current.Value.setListID(current.Value.getListID() - 1); // Remove the object from the objectList objectList.Remove(removeObject); }
public CRicochetShot(CGameObject parent) : base(parent) { }
public virtual void HandleCollision(CGameObject gameObject) { }