Ejemplo n.º 1
0
        public void LoadContent(Vector2 pos, int health)
        {
            SetDrawDepthRange(100, 199);
            SetDepth(100);
            Collidable = true;
            isAlive = true;

            DamagePopups = new List<DamagePopup>();
            droppedObject = GenerateDebris();

            Health = CurrentHealth = health;
            Position = pos;
            //Texture = animations[0].Texture;
        }
Ejemplo n.º 2
0
        private void PickupNewObject()
        {
            if (heldObject == null)
            {
                for (int i = firstObjectDisplayed; i < drawableObjects.Count; i++)
                    if (drawableObjects[i].BoundingBox.Contains(new Point(Globals.mouseState.X, Globals.mouseState.Y)))
                    {
                        heldObject = drawableObjects[i];
                        drawableObjects[i].scale = Vector2.One;
                    }

            }
        }
Ejemplo n.º 3
0
 private void DropNewObject(Level level)
 {
     level.AddDrawableObject(heldObject);
     LoadContent();
     heldObject = null;
 }
Ejemplo n.º 4
0
 public bool withinPickupRangeOf(DrawableObject obj)
 {
     Vector2 Distance = Vector2.Subtract(obj.Position, Position);
     if (Distance.Length() <= orbitPullRange)
         return true;
     else
         return false;
 }
Ejemplo n.º 5
0
 private void DeselectObject(DrawableObject gameObject)
 {
     selectedObjects.Remove(gameObject);
     gameObject.Selected = !gameObject.Selected;
 }
Ejemplo n.º 6
0
 public void AddDrawableObject(DrawableObject newObject)
 {
     newObject.Position += _camera.Position;
     drawableObjects.Add(newObject);
 }
Ejemplo n.º 7
0
 public void addDrawableObject(DrawableObject dObj)
 {
     if (dObj != null)
         drawableObjects.Add(dObj);
 }