public virtual void RegisterObject(AbstractGameObject GameObject, bool Drawable)
		{
			RegisterUpdatableObject(GameObject);

			if (Drawable)
			{
				RegisterDrawableObject(GameObject);
			}
		}
Example #2
0
		public override void RegisterObject(AbstractGameObject GameObject, bool Drawable)
		{
			base.RegisterObject(GameObject, Drawable);

			if (GameObject.GetType().IsSubclassOf(typeof(Unit)))
			{
				units.Add(GameObject as Unit);
			}
			else if (GameObject.GetType().IsSubclassOf(typeof(Building)))
			{
				buildings.Add(GameObject as Building);
			}
		}
		public virtual void RegisterDrawableObject(AbstractGameObject GameObject)
		{
			drawableObjects.Add(GameObject);
		}
		public virtual void RegisterUpdatableObject(AbstractGameObject GameObject)
		{
			updatableObjects.Add(GameObject);
		}