private IEnumerator createData() { bool exist = true; if (DoAction.getInstance().findFiles("monster01") == false) { MonsterCreate.getInstance().m01Create(); MonsterCreate.getInstance().m02Create(); MonsterCreate.getInstance().m03Create(); MonsterCreate.getInstance().m04Create(); MonsterCreate.getInstance().m05Create(); } if (DoAction.getInstance().findFiles("skill01") == false) { SkillCreat.getInstance().skill01Create(); SkillCreat.getInstance().skill02Create(); SkillCreat.getInstance().skill03Create(); SkillCreat.getInstance().skill04Create(); SkillCreat.getInstance().skill05Create(); SkillCreat.getInstance().skill06Create(); SkillCreat.getInstance().skill07Create(); SkillCreat.getInstance().skill08Create(); } if (DoAction.getInstance().findFiles("player") == false) { PlayerCreate.getInstance().playerCreate(); } if (DoAction.getInstance().findFiles("usingskill") == false) { OtherCreate.getInstance().usingSkill(1, 2, 3, 4); } yield return(0); }
public void missionBlood(int mission) { temp_blood = DoAction.getInstance().bloodAndMission(0, mission, temp_blood); p_blood = temp_blood; p_attack = temp_attack; p_defend = temp_defend; p_speed = temp_speed; //temp_blood = p_blood; }
public void m05Create() { Monster m = new Monster(); m.Id = 5; m.Blood = 22.5f; m.Attack = 0.45f; m.Defend = 0; m.Speed = 0.8f; DoAction.getInstance().writeData <Monster>(m, "Monster05"); }
public void playerCreate() { Player p = new Player(); p.Id = 1; p.Blood = 30; p.Defend = 10; p.Attack = 10; p.Speed = 1; p.Level = 1; DoAction.getInstance().writeData <Player>(p, "Player"); }
public void skill05Create() { Skill s = new Skill(); s.Skill_id = 5; s.Skill_name = "no.5"; s.Skill_attack = 10; s.Skill_CD = 5; s.Skill_Dir = 10; s.BuffType = new Buff(); s.BuffType.MonsterBuff = Buff.MONSTERBUFF.FIREDAMAGE; s.ResName = @""; DoAction.getInstance().writeData <Skill>(s, "Skill05"); }
public void skill04Create() { Skill s = new Skill(); s.Skill_id = 4; s.Skill_name = "no.4"; s.Skill_attack = 8; s.Skill_CD = 2; s.Skill_Dir = 10; s.BuffType = new Buff(); s.BuffType.MonsterBuff = Buff.MONSTERBUFF.HARDDAMAGE; s.ResName = @"F:\allprojects\unitypro\Nonstop_Finger\Assets\Data\skill03.jpg"; DoAction.getInstance().writeData <Skill>(s, "Skill04"); }
void Awake() { //Debug.Log(System.IO.Directory.GetCurrentDirectory()); //DoAction.getInstance().writeData<string>(System.IO.Directory.GetCurrentDirectory(), System.IO.Directory.GetCurrentDirectory(), true); //_buff = new PlayerBuff(); //_buff.getBuff().PlayerBuff = Buff.PLAYERBUFF.NONE; gameManager = Camera.main.gameObject; player = new Player(); p_skill01 = new Skill(); p_skill02 = new Skill(); p_skill03 = new Skill(); p_skill04 = new Skill(); setSkill01(1); setSkill02(2); setSkill03(3); setSkill04(4); //try //{ player = DoAction.getInstance().readData <Player>(player); //} //catch (System.Exception e) //{ } //finally //{ // player.Id = 0; // player.Blood = 23; // player.Attack = 10; // player.Defend = 10; // player.Level = 1; // player.Speed = 1; // DoAction.getInstance().writeData<Player>(player); //} p_id = player.Id; p_blood = player.Blood; p_attack = player.Attack; //p_skill = new Skill(); p_defend = player.Defend; p_speed = player.Speed; p_level = player.Level; temp_blood = p_blood; temp_attack = p_attack; temp_defend = p_defend; temp_speed = p_speed; //mission = GameManager.mission; //Debug.Log(p_blood); }
void Awake() { //先把总管理器获取了,然后再获得相关敌人的信息 gameManager = Camera.main.gameObject; monster = new Monster(); for (int index = 0; index < 5; ++index) { if (transform.name == ("Monster0" + (index + 1))) { monster = DoAction.getInstance().readData <Monster>(monster, "Monster0" + (index + 1)); } } m_id = monster.Id; id = m_id; m_blood = monster.Blood; m_attack = monster.Attack; m_defend = monster.Defend; m_speed = monster.Speed; temp_blood = m_blood; }
public void setSkill04(int id) { p_skill04 = DoAction.getInstance().readData <Skill>(p_skill04, "Skill0" + id); GameObject.Find("Skill04").GetComponent <UISkill>().skilltime = p_skill04.Skill_CD; GameObject.Find("Skill04").transform.FindChild("icon").GetComponent <UISprite>().spriteName = "skill03"; }
float buffChange(float predata, float tempdata, float adddata) { return(DoAction.getInstance().addBuff(0, predata, tempdata, adddata)); }
float buffChange(float preData, float damage) { return(DoAction.getInstance().addBuff(1, preData, damage)); }
public void missionBlood(int mission) { m_blood = DoAction.getInstance().bloodAndMission(1, mission); }
public void missionAct(int mission) { m_attack = DoAction.getInstance().actAndMission(1, mission); }
public void usingSkill(params int[] ID) { DoAction.getInstance().writeData(ID, "UsingSkill"); }