public Player(Texture2D texture, TileMap map, SceneObjectHandler objectHandler, GameOverlay overlay) { this.texture = texture; position = map.GetSpawn(); this.map = map; this.objectHandler = objectHandler; this.overlay = overlay; dimensions = new Vector2(texture.Width, texture.Height); collisionManager = new EntityCollisionHandler(this.map); inputManager = new PlayerInputHandler(); physicsManager = new PhysicsHandler(collisionManager); heldItemManager = new HeldItemHandler(map); }
public Enemy(Vector2 position, Texture2D texture, TileMap tileMap) { collisionHandler = new EnemyCollisionHandler(tileMap); this.tileMap = tileMap; this.position = position; this.texture = texture; state = States.idle; dimensions = new Vector2(texture.Width, texture.Height); path = new List <Vector2>(); rnd = new Random(); //idle isWalking = false; time = 0; timeBetween = rnd.Next(200); }