public Spearman(CollisionDetection objects, AIReader AiInputReader) : base(textures, objects, AiInputReader) { //animations AnimationCreator creator = new AnimationCreator(); animations = creator.GetSpearmanAnimation(); CollisionRectangle = new Rectangle((int)Position.X, (int)Position.Y, Spearman.Width - 20, Spearman.height);//-20 offset door de speer die hij vastheeft }
public Enemy(List <Texture2D> textures, CollisionDetection objects, AIReader AiInputReader) { //basic information of entity Position = new Vector2(100, 100); VerticalMovement = new Vector2(0, 0); // X: verticalmovement => 1 = ja 0= nee Y: current jump speed HorizontalMovement = new Vector2(0, 2); // X: richting -1 => links 0=> stil 1=> rechts Y: Current movespeed status = CharState.idle; richting = LoopRichting.links; texture = textures; this.Attackbox = new Rectangle(0, 0, 60, 60); Attacklock = false; Health = 100; Damage = 10; //animations zal gegeven worden door de overerving //movement and input this.inputreader = AiInputReader; this.inputreader.SetEntity(this); this.movecommand = new MoveCommand(objects); }