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

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

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

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