Example #1
0
 public Bullet(SimulationWorld world, Entity entity, Vector2 location, Vector2 direction) : base(world, new Rectangle(0, 0, 5, 5), new Rectangle(0, 0, 1, 1), Globals.pixel)
 {
     this.entity = entity;
     this.location = location;
     this.direction = direction;
     distance = 0;
     speed = 400;
 }
Example #2
0
        public Message(string msg, Entity entity, Color color)
        {
            this.msg = msg;
            this.color = color;
            this.entity = entity;

            opacity = 255;
            Offset = new Vector2(-Globals.GetTextSize(msg).X / 2, -entity.GetRecHit().Height/2 - Globals.GetTextSize(msg).Y);
        }