Exemplo n.º 1
0
 /*void ScenarioRun(){
  *  scenarioId = GUI.TextField(new Rect(50, 100, 200, 30), scenarioId);
  *  if (GUI.Button(new Rect(50, 150, 200, 30), "run"))
  *  {
  *      this.StartCoroutine(CreateScriptableObjectMasterScenarioRun(scenarioId == "all" ? 0 : int.Parse(scenarioId)));
  *  }
  *  if (GUI.Button(new Rect(50, 200, 200, 30), "返回"))
  *  {
  *      type = "";
  *  }
  * }*/
 void UserReset()
 {
     userId = GUI.TextField(new Rect(50, 100, 200, 30), userId);
     if (GUI.Button(new Rect(50, 150, 200, 30), "reset"))
     {
         SEditorMaster sMaster = new SEditorMaster();
         //StartCoroutine (sMaster.RequestUserReset(userId));
     }
 }
Exemplo n.º 2
0
        IEnumerator CreateScriptableObjectMasterBattleFieldRun()
        {
            var asset = ScriptableObject.CreateInstance <App.Model.Scriptable.BattlefieldAsset>();

            SEditorMaster sMaster = new SEditorMaster();

            yield return(StartCoroutine(sMaster.RequestAll("battlefield")));

            asset.battlefields = sMaster.responseAll.battlefields;

            UnityEditor.AssetDatabase.CreateAsset(asset, string.Format(scriptableObjectPath, App.Model.Scriptable.BattlefieldAsset.Name));
            UnityEditor.AssetDatabase.Refresh();
        }
Exemplo n.º 3
0
        IEnumerator CreateScriptableObjectMasterCharacterRun()
        {
            var areaAsset = ScriptableObject.CreateInstance <App.Model.Scriptable.CharacterAsset>();

            SEditorMaster sMaster = new SEditorMaster();

            yield return(StartCoroutine(sMaster.RequestAll("character")));

            areaAsset.characters = sMaster.responseAll.characters;

            UnityEditor.AssetDatabase.CreateAsset(areaAsset, string.Format(scriptableObjectPath, App.Model.Scriptable.CharacterAsset.Name));
            UnityEditor.AssetDatabase.Refresh();
        }
Exemplo n.º 4
0
        IEnumerator CreateScriptableObjectMasterWeaponRun()
        {
            var asset = ScriptableObject.CreateInstance <App.Model.Scriptable.WeaponAsset>();

            SEditorMaster sMaster = new SEditorMaster();

            yield return(StartCoroutine(sMaster.RequestAll("weapon")));

            asset.equipments = sMaster.responseAll.weapons;

            UnityEditor.AssetDatabase.CreateAsset(asset, string.Format(scriptableObjectPath, App.Model.Scriptable.WeaponAsset.Name));
            UnityEditor.AssetDatabase.Refresh();
        }