Exemple #1
0
 public NonPlayerCharacter(int x, int y, string SpriteName = Constants.NPC.DEFAULT_SPRITE) : base()
 {
     aiBehaviorComponent             = new AIBehaviorsComponent();
     PhysicsComponent.position       = new Vector2(x * Constants.TILESIZE, y * Constants.TILESIZE);
     PhysicsComponent.destination    = this.PhysicsComponent.position;
     PhysicsComponent.Speed          = Constants.NPC.DEFAULT_SPEED;
     SpriteComponent.TextureName     = SpriteName;
     SpriteComponent.TextureModifier = Constants.NPC.DEFAULT_NPC_SIZE_MODIFIER;
 }
Exemple #2
0
 public NonPlayerCharacter(string SpriteName = Constants.NPC.DEFAULT_SPRITE) : base()
 {
     aiBehaviorComponent             = new AIBehaviorsComponent();
     PhysicsComponent.position       = new Vector2(RandomNumbersHelper.ReturnRandomNumber(Constants.Map.DEFAULT_MAP_WIDTH - 1) * Constants.TILESIZE, RandomNumbersHelper.ReturnRandomNumber(Constants.Map.DEFAULT_MAP_HEIGHT - 1) * Constants.TILESIZE);
     PhysicsComponent.destination    = this.PhysicsComponent.position;
     PhysicsComponent.Speed          = Constants.NPC.DEFAULT_SPEED;
     SpriteComponent.TextureName     = SpriteName;
     SpriteComponent.TextureModifier = Constants.NPC.DEFAULT_NPC_SIZE_MODIFIER;
 }