<commit_before>package test.cocos.airplain;

/**
 * 英雄，属性有：多把枪用于远程攻击；增加超级攻击的方法；可以获得各种补给等；
 */
public class RoleHero extends Role {
	public RoleHero() {
		super(RoleTeam.RoleTeamHero, 100, 100, 100);
	}

	private Gun mGunSingleInfinite;
	private Gun mGunDouble;
	private Gun mGunSupper;

	private Gun mGunCurrent;

	private final int MAX_HP = 100;

	public void switchGunSingleInflite() {
		mGunCurrent = mGunSingleInfinite;
	}

	public void switchGunDouble() {
		mGunCurrent = mGunDouble;
	}

	// 引爆全屏
	public void attackSupper() {
		mGunCurrent = mGunSupper;
	}

	@Override
	public void fire(Role target) {
		// TODO Auto-generated method stub
		int x = 10;
		int y = 10;
		if (!mGunCurrent.fire(DirectorVice.getInstance().getGamLayer(), x, y)) {
			switchGunSingleInflite();
			mGunCurrent.fire(DirectorVice.getInstance().getGamLayer(), x, y);
		}
	}

	@Override
	public void fireSuper(Role target) {
		mGunSupper.fire(DirectorVice.getInstance().getGamLayer(), 0, 0);
	}<commit_msg>refactor code<commit_after>package test.cocos.airplain;

/**
 * 英雄，属性有：多把枪用于远程攻击；增加超级攻击的方法；可以获得各种补给等；
 */
public class RoleHero extends Role {
	public RoleHero() {
		super(RoleTeam.RoleTeamHero, 100, 100, 100);
	}

	private Gun mGunSingleInfinite;
	private Gun mGunDouble;
	private Gun mGunSupper;

	private Gun mGunCurrent;

	private final int MAX_HP = 100;

	public void switchGunSingleInflite() {
		mGunCurrent = mGunSingleInfinite;
	}

	public void switchGunDouble() {
		mGunCurrent = mGunDouble;
	}

	@Override
	public void fire(Role target) {
		// TODO Auto-generated method stub
		int x = 10;
		int y = 10;
		if (!mGunCurrent.fire(DirectorVice.getInstance().getGamLayer(), x, y)) {
			switchGunSingleInflite();
			mGunCurrent.fire(DirectorVice.getInstance().getGamLayer(), x, y);
		}
	}

	@Override
	public void fireSuper(Role target) {
		mGunSupper.fire(DirectorVice.getInstance().getGamLayer(), 0, 0);
	}
{'fraction_non_alphanumeric': 0.11702688455455983, 'fraction_numerical': 0.018977332630469163, 'mean_word_length': 4.549707602339181, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '6944543', 'n_tokens_mistral': 830, 'n_tokens_neox': 742, 'n_words': 151}