清理项目
This commit is contained in:
@@ -1,43 +0,0 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using MuHua;
|
||||
|
||||
/// <summary>
|
||||
/// 请求 - 管理器
|
||||
/// </summary>
|
||||
public class ManagerRequest : ModuleSingle<ManagerRequest> {
|
||||
|
||||
/// <summary> 域名 </summary>
|
||||
public static string Address => "http://localhost:5086";
|
||||
|
||||
protected override void Awake() => NoReplace(false);
|
||||
|
||||
#region 用户
|
||||
/// <summary> 登录 </summary>
|
||||
public void Login(string username, string password, Action<string> callback) {
|
||||
string url = Address + "/api/user/login";
|
||||
DataLoginRequest login = new DataLoginRequest { username = username, password = password };
|
||||
PostForm(url, login, callback);
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 请求类型
|
||||
public void PostForm<T>(string url, T data, Action<string> callback) {
|
||||
string json = JsonTool.ToJson(data);
|
||||
Debug.Log(json);
|
||||
DataRequestPost request = new DataRequestPost(url, json);
|
||||
request.OnError = (json) => { ErrorHandle(url, json); };
|
||||
request.OnCallback = callback;
|
||||
NetworkRequestAsync.Execute(request);
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 结果处理
|
||||
/// <summary> 错误处理 </summary>
|
||||
private void ErrorHandle(string url, string json) {
|
||||
Debug.LogError($"{url} \n {json}");
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 2b4112fa4a2bfe84984b0472be3af46c
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,34 +0,0 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using MuHua;
|
||||
|
||||
/// <summary>
|
||||
/// 模拟器 - 管理
|
||||
/// </summary>
|
||||
public class ManagerSimulator : ModuleSingle<ManagerSimulator> {
|
||||
|
||||
/// <summary> 队伍1 </summary>
|
||||
public BattleTeam team1;
|
||||
/// <summary> 队伍2 </summary>
|
||||
public BattleTeam team2;
|
||||
|
||||
public BattleSimulator battleSimulator;
|
||||
|
||||
protected override void Awake() => NoReplace(false);
|
||||
|
||||
private void Start() {
|
||||
team1 = new BattleTeam();
|
||||
team1.Add(CharacterDictionary.Character001());
|
||||
team1.Add(CharacterDictionary.Character002());
|
||||
team1.Add(CharacterDictionary.Character003());
|
||||
|
||||
team2 = new BattleTeam();
|
||||
team2.Add(MonsterDictionary.Monster001());
|
||||
team2.Add(MonsterDictionary.Monster002());
|
||||
team2.Add(MonsterDictionary.Monster002());
|
||||
|
||||
battleSimulator = new BattleSimulator(team1, team2);
|
||||
battleSimulator.Transition(PhaseType.先攻阶段);
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 3ce4cafcd40fff3428928289fa060de4
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,13 +0,0 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using MuHua;
|
||||
|
||||
/// <summary>
|
||||
/// 测试管理器
|
||||
/// </summary>
|
||||
public class TestManager : ModuleSingle<TestManager> {
|
||||
|
||||
protected override void Awake() => NoReplace();
|
||||
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 48413b9054701704499e7cb2c698ac97
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Reference in New Issue
Block a user