예제 #1
0
 public CGameObject()
 {
     m_pUpdateData = new UpdateData();
     m_pRenderData = new RenderData();
     m_pParent = null;
     nId = -1;
 }
예제 #2
0
        /// <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);
        }
예제 #3
0
 public CSpreadShot(CGameObject parent)
     : base(parent)
 {
 }
예제 #4
0
 public HomingMissileShot(CGameObject parent)
     : base(parent)
 {
 }
예제 #5
0
 public LaserPattern(CGameObject parent)
     : base(parent)
 {
 }
예제 #6
0
 public CLaserShot(CGameObject parent)
     : base(parent)
 {
 }
 public HomingMissilePattern(CGameObject parent)
     : base(parent)
 {
 }
예제 #8
0
 public RicochetPattern(CGameObject parent)
     : base(parent)
 {
 }
예제 #9
0
 public CBaseWeapon(CGameObject parent)
     : base()
 {
     m_pParent = parent;
     m_pBulletPattern = new BaseBulletPattern(this);
 }
예제 #10
0
 public SpreadPattern(CGameObject parent)
     : base(parent)
 {
 }
예제 #11
0
 public override void HandleCollision(CGameObject gameObject)
 {
     base.HandleCollision(gameObject);
 }
예제 #12
0
 public BaseBulletPattern(CGameObject parent)
     : base()
 {
     m_pParent = parent;
 }
예제 #13
0
        /// <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);
        }
예제 #14
0
 public CRicochetShot(CGameObject parent)
     : base(parent)
 {
 }
예제 #15
0
 public virtual void HandleCollision(CGameObject gameObject)
 {
 }