Example #1
0
        public MotionEngine(GameObject target)
        {
            character = target;
            OldDirection = Vector2.Zero;

            Enabled = true;
        }
Example #2
0
        public void RemoveGameObject(GameObject gameObject)
        {
            allObjects.Remove(gameObject);

            DrawableGameObject drawableGameObject = gameObject as DrawableGameObject;
            if (drawableGameObject != null)
            {
                drawableObjects.Remove(drawableGameObject);
            }
        }
Example #3
0
 public bool ContainsGameObject(GameObject gameObject)
 {
     return allObjects.Contains(gameObject);
 }
Example #4
0
        public void AddGameObject(GameObject gameObject)
        {
            allObjects.Add(gameObject);

            DrawableGameObject drawableGameObject = gameObject as DrawableGameObject;
            if (drawableGameObject != null)
            {
                drawableObjects.Add(drawableGameObject);
            }
        }