public Eric(Game game, Vector2 location) : base(game) { this.Level = this.Experience = this.RechargeTime = 0; this.Health = 100; this.Step = 4; this.Direction = 6; this.IsCollision = false; this.Location = location; TextureMovement = new Dictionary <int, Texture2D>(); this.LoadContent(); CreateGameObject = new Dictionary <int, DMethods> { { 0, this.CreateCameraTower }, { 1, this.CreateSnowball }, { 2, this.NullObject }, }; Animation = new Animation(Game, this.TextureMovement[0], this.Location, ManagerHero.GetSize(this.Type), 3, 8); // HealthIndicator = new HealthIndicator(Game); Random = new Random(DateTime.Now.Millisecond); }
private void KeyIs(int index, int direction, int frame, int startFrame, float timeFrame) { this.AnimationMove(index, direction, frame, startFrame, timeFrame); this.Location = ManagerHero.Movement(direction, this.Location, this.Step); Animation.Location = this.Location; }