<commit_before>package com.v5ent.game.entities;

import java.util.List;

import com.badlogic.gdx.graphics.g2d.Animation;
import com.badlogic.gdx.graphics.g2d.Sprite;
import com.badlogic.gdx.graphics.g2d.SpriteBatch;
import com.badlogic.gdx.graphics.g2d.TextureRegion;
import com.badlogic.gdx.math.Vector2;
import com.v5ent.game.core.Assets;
import com.v5ent.game.core.Assets.AssetHero;

public class Hero extends Sprite{
	
	private static final String TAG = Hero.class.getName();
	/**---僵直---**/
	public enum State {
		IDLE, WALKING,MAGIC,FIGHT,BEATEN,DEAD,STIFF
	}
	
	public enum Buff {
		ICE,STONE, TOXICOSIS,FIRE
	}

	public enum Direction {
		RIGHT, LEFT;
	}
	
	private String id;
	private String name;
	private String desc;
	/**可移动范围(0,0)-(1,0),(2,0) */
	private List<Vector2> moveRange;
	/**攻击范围(0,0)-(1,0),(2,0) */
	private List<Vector2> fightRange;
	/**在地图上的位置坐标*/
	private int mapX;
	private int mapY;
	
	/** 是否被选中 */
	private boolean selected;
	protected float frameTime = 0f;
	/**当前帧*/
	private TextureRegion currentFrame = null;

	
	public Hero(String id) {
		AssetHero ah = Assets.instance.assetHeros.get(id);
		
//		super(ah.stand);
	}
	
	/** 朝向 */
	private Direction dir;
	private Vector2 nextPosition;
	private Vector2 velocity;
	
	private Animation walkLeftAnimation;
	private Animation walkRightAnimation;

	public void setDirection(Direction direction, float deltaTime) {
		this.dir = direction;
		// Look into the appropriate variable when changing position
		switch (dir) {<commit_msg>frameTime updated<commit_after>package com.v5ent.game.entities;

import java.util.List;

import com.badlogic.gdx.graphics.g2d.Animation;
import com.badlogic.gdx.graphics.g2d.Sprite;
import com.badlogic.gdx.graphics.g2d.SpriteBatch;
import com.badlogic.gdx.graphics.g2d.TextureRegion;
import com.badlogic.gdx.math.Vector2;
import com.v5ent.game.core.Assets;
import com.v5ent.game.core.Assets.AssetHero;

public class Hero extends Sprite{
	
	private static final String TAG = Hero.class.getName();
	/**---僵直---**/
	public enum State {
		IDLE, WALKING,MAGIC,FIGHT,BEATEN,DEAD,STIFF
	}
	
	public enum Buff {
		ICE,STONE, TOXICOSIS,FIRE
	}

	public enum Direction {
		RIGHT, LEFT;
	}
	
	private String id;
	private String name;
	private String desc;
	/**可移动范围(0,0)-(1,0),(2,0) */
	private List<Vector2> moveRange;
	/**攻击范围(0,0)-(1,0),(2,0) */
	private List<Vector2> fightRange;
	/**在地图上的位置坐标*/
	private int mapX;
	private int mapY;
	
	/** 是否被选中 */
	private boolean selected;
	protected float frameTime = 0f;
	/**当前帧*/
	private TextureRegion currentFrame = null;

	
	public Hero(String id) {
		AssetHero ah = Assets.instance.assetHeros.get(id);
	}
	
	/** 朝向 */
	private Direction dir;
	private Vector2 nextPosition;
	private Vector2 velocity;
	
	private Animation walkLeftAnimation;
	private Animation walkRightAnimation;

	public void update(float delta) {
		frameTime = (frameTime + delta) % 5; // Want to avoid overflow
	}
	
	public void setDirection(Direction direction, float deltaTime) {
		this.dir = direction;
		// Look into the appropriate variable when changing position
		switch (dir) {
{'fraction_non_alphanumeric': 0.12334517274782048, 'fraction_numerical': 0.01646754924120116, 'mean_word_length': 4.241962774957699, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '357791', 'n_tokens_mistral': 1192, 'n_tokens_neox': 1139, 'n_words': 258}