public static void SaveString2() { TextAsset test = Resources.Load <TextAsset>("code/Skill001.lua"); XLua.LuaEnv luaenv = new XLua.LuaEnv(); //luaenv.DoString("CS.UnityEngine.Debug.Log('hello world')"); luaenv.DoString(test.text); luaenv.Dispose(); Debug.Log(test); return; CustomSkill skill = SkillUtils.MakeCustomSkill("001"); skill.id = 001; skill.Trigger(CustomSkill.TriggerType.fight); return; FormulaUtils.GetTowerExtraAttributes(false); return; for (int i = 0; i < 10; i++) { Debug.Log(UnityEngine.Random.Range(0, 0.5f)); } return; //PlayerSQLPrefs.yzTowerLevel = 10; //PlayerSQLPrefs.yzTowerABSLevel = 10; PlayerOtherItem.ReduceItem(GameInstance.GameDatabase.otherItem[0].Id, 10); }
//战斗中使用的,不至于共用 public List <CustomSkill> GetBattleCustomSkills() { string[] cskills = customSkill.Split(';'); List <CustomSkill> customs = new List <CustomSkill>(); for (int i = 0; i < cskills.Length; i++) { if (!string.IsNullOrEmpty(cskills[i])) { customs.Add(SkillUtils.MakeCustomSkill(cskills[i])); } } customSkills = customs; return(customs); }
public Dictionary <string, CustomSkill> GetCloneCustomSkills() { Dictionary <string, CustomSkill> cloneskill = new Dictionary <string, CustomSkill>(); cloneskill.Add(Const.NormalAttack, SkillUtils.MakeCustomSkill("NormalAttack")); string[] skillId = customSkill.Split(','); for (int i = 0; i < skillId.Length; i++) { if (!string.IsNullOrEmpty(skillId[i])) { cloneskill.Add(skillId[i], SkillUtils.MakeCustomSkill(skillId[i])); } } return(cloneskill); }