add network
parent
9f04d24120
commit
ef3f7754a7
|
@ -6,39 +6,34 @@
|
|||
<component name="ChangeListManager">
|
||||
<list default="true" id="d018256f-8250-4025-b60e-7cdf03f0e7e0" name="Changes" comment="">
|
||||
<change beforePath="$PROJECT_DIR$/.idea/.idea.TestF/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/.idea.TestF/.idea/workspace.xml" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Assets/Scripts/BFS/BFS.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Scripts/BFS/BFS.cs" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Assets/GameRes/Prefabs/UI/InputNameUI.prefab" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/GameRes/Prefabs/UI/InputNameUI.prefab" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Assets/Resources/Fonts/MSYH SDF.asset" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Resources/Fonts/MSYH SDF.asset" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Assets/Scenes/Init.unity" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Scenes/Init.unity" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Assets/Scripts/Dinosaurs/Boss/IBoss.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Scripts/Dinosaurs/Boss/IBoss.cs" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Assets/Scripts/Dinosaurs/Boss/IBossManager.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Scripts/Dinosaurs/Boss/IBossManager.cs" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Assets/Scripts/Dinosaurs/DinosaursGameManager.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Scripts/Dinosaurs/DinosaursGameManager.cs" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Assets/Scripts/Dinosaurs/Player/Player.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Scripts/Dinosaurs/Player/Player.cs" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Assets/Scripts/Dinosaurs/Player/PlayerData.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Scripts/Dinosaurs/Player/PlayerData.cs" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Assets/Scripts/Dinosaurs/Player/PlayerInfo.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Scripts/Dinosaurs/Player/PlayerInfo.cs" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Assets/Scripts/Dinosaurs/Player/PlayerManager.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Scripts/Dinosaurs/Player/PlayerManager.cs" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Assets/Scripts/Dinosaurs/Robot/Robot.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Scripts/Dinosaurs/Robot/Robot.cs" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Assets/Scripts/Dinosaurs/Robot/RobotManager.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Scripts/Dinosaurs/Robot/RobotManager.cs" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Assets/Scripts/Dinosaurs/Room/IRoomManager.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Scripts/Dinosaurs/Room/IRoomManager.cs" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Assets/Scripts/Dinosaurs/Room/Room.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Scripts/Dinosaurs/Room/Room.cs" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Assets/StreamingAssets/yoo/DefaultPackage/39c3237a04b391baa09ea291c3fdef1e.bundle" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Assets/StreamingAssets/yoo/DefaultPackage/39c3237a04b391baa09ea291c3fdef1e.bundle.meta" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Assets/StreamingAssets/yoo/DefaultPackage/PackageManifest_DefaultPackage.version" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/StreamingAssets/yoo/DefaultPackage/PackageManifest_DefaultPackage.version" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Assets/StreamingAssets/yoo/DefaultPackage/PackageManifest_DefaultPackage_2024-04-27-675.bytes" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Assets/StreamingAssets/yoo/DefaultPackage/PackageManifest_DefaultPackage_2024-04-27-675.bytes.meta" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Assets/StreamingAssets/yoo/DefaultPackage/PackageManifest_DefaultPackage_2024-04-27-675.hash" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Assets/StreamingAssets/yoo/DefaultPackage/PackageManifest_DefaultPackage_2024-04-27-675.hash.meta" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Bundles/Android/DefaultPackage/2024-04-27-675/0fcdb1f7e47b46662e2ce6a0555441d9.bundle" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Bundles/Android/DefaultPackage/2024-04-27-675/24faa8c8dab37ef2ad69ed0f7ad38126.bundle" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Bundles/Android/DefaultPackage/2024-04-27-675/38f126c3049ce63d988083fef666a174.bundle" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Bundles/Android/DefaultPackage/2024-04-27-675/39c3237a04b391baa09ea291c3fdef1e.bundle" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Bundles/Android/DefaultPackage/2024-04-27-675/4cc947fd9b21e43a443ba995ae0e2f8d.bundle" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Bundles/Android/DefaultPackage/2024-04-27-675/668352bfa2f427863b0b136f58f0d5b5.bundle" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Bundles/Android/DefaultPackage/2024-04-27-675/6e493c6dd41ebe160a1dc4e699fc5f1e.bundle" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Bundles/Android/DefaultPackage/2024-04-27-675/8fb41250decb653756535901c4cbb85b.bundle" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Bundles/Android/DefaultPackage/2024-04-27-675/99da34fb6ff0d8471c19d33110d6ec5a.bundle" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Bundles/Android/DefaultPackage/2024-04-27-675/BuildReport_DefaultPackage_2024-04-27-675.json" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Bundles/Android/DefaultPackage/2024-04-27-675/OutputCache" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Bundles/Android/DefaultPackage/2024-04-27-675/OutputCache.manifest" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Bundles/Android/DefaultPackage/2024-04-27-675/PackageManifest_DefaultPackage.version" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Bundles/Android/DefaultPackage/2024-04-27-675/PackageManifest_DefaultPackage_2024-04-27-675.bytes" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Bundles/Android/DefaultPackage/2024-04-27-675/PackageManifest_DefaultPackage_2024-04-27-675.hash" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Bundles/Android/DefaultPackage/2024-04-27-675/PackageManifest_DefaultPackage_2024-04-27-675.json" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Bundles/Android/DefaultPackage/2024-04-27-675/a138473dc0a7159424a9f5a869d00ef6.bundle" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Bundles/Android/DefaultPackage/2024-04-27-675/acc6d507260420deaf2249f60b8441b6.bundle" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Bundles/Android/DefaultPackage/OutputCache/defaultpackage_assets_gameres_scene.bundle" beforeDir="false" afterPath="$PROJECT_DIR$/Bundles/Android/DefaultPackage/OutputCache/defaultpackage_assets_gameres_scene.bundle" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Bundles/Android/DefaultPackage/OutputCache/defaultpackage_assets_gameres_scene.bundle.manifest" beforeDir="false" afterPath="$PROJECT_DIR$/Bundles/Android/DefaultPackage/OutputCache/defaultpackage_assets_gameres_scene.bundle.manifest" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Assets/Scripts/Dinosaurs/Room/RoomData.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Scripts/Dinosaurs/Room/RoomData.cs" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Assets/Scripts/Event/Args/PlayerJinBeiChange_ToMainUIEventArgs.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Scripts/Event/Args/PlayerJinBeiChange_ToMainUIEventArgs.cs" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Assets/Scripts/Game.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Scripts/Game.cs" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Assets/Scripts/Helper/CommonHelper.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Scripts/Helper/CommonHelper.cs" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Assets/Scripts/Network/HttpManager.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Scripts/Network/HttpManager.cs" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Assets/Scripts/Network/NetworkConst.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Scripts/Network/NetworkConst.cs" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Assets/Scripts/Network/SocketManager.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Scripts/Network/SocketManager.cs" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Assets/Scripts/Procedure/Logic/GameSceneLogicProcedure.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Scripts/Procedure/Logic/GameSceneLogicProcedure.cs" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Assets/Scripts/Procedure/Logic/LoadingHallSceneProcedure.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Scripts/Procedure/Logic/LoadingHallSceneProcedure.cs" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Assets/Scripts/Spine/SpineAnimator.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Scripts/Spine/SpineAnimator.cs" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Assets/Scripts/Test.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Scripts/Test.cs" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Assets/Scripts/UI/MVVM/View/GameSceneMainView.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Scripts/UI/MVVM/View/GameSceneMainView.cs" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Assets/Scripts/UI/MVVM/View/HallSceneMainMenuView.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Scripts/UI/MVVM/View/HallSceneMainMenuView.cs" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Assets/Scripts/UI/UILogic/GameSceneMainUI.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Scripts/UI/UILogic/GameSceneMainUI.cs" afterDir="false" />
|
||||
</list>
|
||||
<option name="SHOW_DIALOG" value="false" />
|
||||
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
||||
|
@ -52,6 +47,8 @@
|
|||
<setting file="file://$APPLICATION_CONFIG_DIR$/resharper-host/DecompilerCache/decompiler/17d9ce77f27a4bd2afb5ba32c9bea97646ac00/2d/00be877c/ThrowHelper.cs" root0="SKIP_HIGHLIGHTING" />
|
||||
<setting file="file://$APPLICATION_CONFIG_DIR$/resharper-host/DecompilerCache/decompiler/17d9ce77f27a4bd2afb5ba32c9bea97646ac00/4f/abdfd757/NullReferenceException.cs" root0="SKIP_HIGHLIGHTING" />
|
||||
<setting file="file://$APPLICATION_CONFIG_DIR$/resharper-host/DecompilerCache/decompiler/5a41d6b7189842eca409fd0b1c3e3dcf17bf78/b7/497ae030/WebSocket.cs" root0="SKIP_HIGHLIGHTING" />
|
||||
<setting file="file://$APPLICATION_CONFIG_DIR$/resharper-host/DecompilerCache/decompiler/5a41d6b7189842eca409fd0b1c3e3dcf17bf78/eb/f5b46e78/EventHandler.cs" root0="SKIP_HIGHLIGHTING" />
|
||||
<setting file="file://$APPLICATION_CONFIG_DIR$/resharper-host/DecompilerCache/decompiler/5a41d6b7189842eca409fd0b1c3e3dcf17bf78/ec/f359a6ff/CollectionExtensions.cs" root0="SKIP_HIGHLIGHTING" />
|
||||
<setting file="file://$APPLICATION_CONFIG_DIR$/resharper-host/DecompilerCache/decompiler/6f8115a8e2e045b29e5fa190e193ec1c27800/63/c27df556/Animator.cs" root0="SKIP_HIGHLIGHTING" />
|
||||
<setting file="file://$APPLICATION_CONFIG_DIR$/resharper-host/DecompilerCache/decompiler/82a2fd073ee449928e161903460426d72ae00/6d/8897fd91/TweenExtensions.cs" root0="SKIP_HIGHLIGHTING" />
|
||||
<setting file="file://$APPLICATION_CONFIG_DIR$/resharper-host/DecompilerCache/decompiler/88e4733ac7bc4ae1b496735e6b83bbd346ac00/34/9d27fe83/AwaitTaskContinuation.cs" root0="SKIP_HIGHLIGHTING" />
|
||||
|
@ -64,7 +61,9 @@
|
|||
<setting file="file://$APPLICATION_CONFIG_DIR$/resharper-host/DecompilerCache/decompiler/d8e27b9b2bf34338bc0a9edd46a39109174200/b9/e602cb14/Object.cs" root0="SKIP_HIGHLIGHTING" />
|
||||
<setting file="file://$APPLICATION_CONFIG_DIR$/resharper-host/DecompilerCache/decompiler/d8e27b9b2bf34338bc0a9edd46a39109174200/da/bd8ed098/Debug.cs" root0="SKIP_HIGHLIGHTING" />
|
||||
<setting file="file://$APPLICATION_CONFIG_DIR$/resharper-host/DecompilerCache/decompiler/d8e27b9b2bf34338bc0a9edd46a39109174200/df/fa0e801d/Component.cs" root0="SKIP_HIGHLIGHTING" />
|
||||
<setting file="file://$USER_HOME$/Downloads/websocket-sharp-master/websocket-sharp/MessageEventArgs.cs" root0="SKIP_HIGHLIGHTING" />
|
||||
<setting file="file://$USER_HOME$/Downloads/websocket-sharp-master/websocket-sharp/WebSocket.cs" root0="SKIP_HIGHLIGHTING" />
|
||||
<setting file="file://$PROJECT_DIR$/Assets/Scripts/Data/PassiveResponse/PassiveResponse.cs" root0="FORCE_HIGHLIGHTING" />
|
||||
<setting file="file://$PROJECT_DIR$/Assets/Scripts/MVVM/Views/ZTestView.cs" root0="FORCE_HIGHLIGHTING" />
|
||||
<setting file="file://$PROJECT_DIR$/Assets/Scripts/ManagerBase.cs" root0="FORCE_HIGHLIGHTING" />
|
||||
<setting file="file://$PROJECT_DIR$/Assets/Scripts/RayCast/MouseInput.cs" root0="FORCE_HIGHLIGHTING" />
|
||||
|
@ -72,6 +71,8 @@
|
|||
<setting file="file://$PROJECT_DIR$/Assets/Scripts/UI/UILogic/InputNameUI.cs" root0="FORCE_HIGHLIGHTING" />
|
||||
<setting file="file://$PROJECT_DIR$/Assets/Scripts/UILoading.cs" root0="FORCE_HIGHLIGHTING" />
|
||||
<setting file="file://$PROJECT_DIR$/Library/PackageCache/com.tuyoogame.yooasset@2.1.0/Runtime/ResourceManager/Handle/AssetHandle.cs" root0="SKIP_HIGHLIGHTING" />
|
||||
<setting file="file://$PROJECT_DIR$/Library/PackageCache/com.tuyoogame.yooasset@2.1.0/Runtime/ResourceManager/Provider/ProviderBase.cs" root0="SKIP_HIGHLIGHTING" />
|
||||
<setting file="file://$PROJECT_DIR$/Library/PackageCache/com.tuyoogame.yooasset@2.1.0/Runtime/ResourceManager/ResourceManager.cs" root0="SKIP_HIGHLIGHTING" />
|
||||
<setting file="file://$PROJECT_DIR$/Library/PackageCache/com.tuyoogame.yooasset@2.1.0/Runtime/ResourcePackage/ResourcePackage.cs" root0="SKIP_HIGHLIGHTING" />
|
||||
<setting file="file://$PROJECT_DIR$/Library/PackageCache/com.tuyoogame.yooasset@2.1.0/Runtime/YooAssets.cs" root0="SKIP_HIGHLIGHTING" />
|
||||
<setting file="file://$PROJECT_DIR$/Library/PackageCache/com.tuyoogame.yooasset@2.1.0/Runtime/YooAssetsExtension.cs" root0="SKIP_HIGHLIGHTING" />
|
||||
|
@ -97,7 +98,7 @@
|
|||
"node.js.selected.package.eslint": "(autodetect)",
|
||||
"node.js.selected.package.tslint": "(autodetect)",
|
||||
"nodejs_package_manager_path": "npm",
|
||||
"settings.editor.selected.configurable": "preferences.CSharpInteractiveConfiguration",
|
||||
"settings.editor.selected.configurable": "CodeLensConfigurable",
|
||||
"vue.rearranger.settings.migration": "true"
|
||||
},
|
||||
"keyToStringList": {
|
||||
|
@ -177,10 +178,10 @@
|
|||
</option>
|
||||
<method v="2" />
|
||||
</configuration>
|
||||
<configuration name="Attach to Unity Editor" type="UNITY_DEBUG_RUN_CONFIGURATION" factoryName="Unity Debug" show_console_on_std_err="false" show_console_on_std_out="false" port="50000" address="localhost" ignored-value-for-modified-check="8068">
|
||||
<configuration name="Attach to Unity Editor" type="UNITY_DEBUG_RUN_CONFIGURATION" factoryName="Unity Debug" show_console_on_std_err="false" show_console_on_std_out="false" port="50000" address="localhost" ignored-value-for-modified-check="5512">
|
||||
<option name="allowRunningInParallel" value="false" />
|
||||
<option name="listenPortForConnections" value="false" />
|
||||
<option name="pid" value="8068" />
|
||||
<option name="pid" value="5512" />
|
||||
<option name="projectPathOnTarget" />
|
||||
<option name="selectedOptions">
|
||||
<list />
|
||||
|
@ -241,7 +242,14 @@
|
|||
<workItem from="1714035987814" duration="543000" />
|
||||
<workItem from="1714036546743" duration="3149000" />
|
||||
<workItem from="1714093188768" duration="25409000" />
|
||||
<workItem from="1714179694184" duration="19454000" />
|
||||
<workItem from="1714179694184" duration="19638000" />
|
||||
<workItem from="1714351883353" duration="3872000" />
|
||||
<workItem from="1714358887686" duration="243000" />
|
||||
<workItem from="1714360306575" duration="20399000" />
|
||||
<workItem from="1714439069746" duration="28384000" />
|
||||
<workItem from="1714697880174" duration="23029000" />
|
||||
<workItem from="1714784281119" duration="27632000" />
|
||||
<workItem from="1714871290863" duration="10640000" />
|
||||
</task>
|
||||
<servers />
|
||||
</component>
|
||||
|
@ -296,30 +304,69 @@
|
|||
<option name="timeStamp" value="11" />
|
||||
</line-breakpoint>
|
||||
<line-breakpoint enabled="true" type="DotNet Breakpoints">
|
||||
<url>file://$PROJECT_DIR$/Assets/Scripts/Network/SocketManager.cs</url>
|
||||
<line>174</line>
|
||||
<properties documentPath="D:\UnityProject\TestF\Assets\Scripts\Network\SocketManager.cs" initialLine="134" containingFunctionPresentation="Method 'SendMessage'">
|
||||
<url>file://$PROJECT_DIR$/Assets/Scripts/NetworkTest.cs</url>
|
||||
<line>49</line>
|
||||
<properties documentPath="D:\UnityProject\TestF\Assets\Scripts\NetworkTest.cs" initialLine="49" containingFunctionPresentation="Method 'Update'">
|
||||
<startOffsets>
|
||||
<option value="4895" />
|
||||
<option value="1546" />
|
||||
</startOffsets>
|
||||
<endOffsets>
|
||||
<option value="4925" />
|
||||
<option value="1593" />
|
||||
</endOffsets>
|
||||
</properties>
|
||||
<option name="timeStamp" value="16" />
|
||||
<option name="timeStamp" value="41" />
|
||||
</line-breakpoint>
|
||||
<line-breakpoint enabled="true" type="DotNet Breakpoints">
|
||||
<url>file://$PROJECT_DIR$/Assets/Scripts/Dinosaurs/Room/IRoomManager.cs</url>
|
||||
<line>143</line>
|
||||
<properties documentPath="D:\UnityProject\TestF\Assets\Scripts\Dinosaurs\Room\IRoomManager.cs" initialLine="143" containingFunctionPresentation="Method 'JoinRoomAsync'">
|
||||
<url>file://$PROJECT_DIR$/Assets/Scripts/Dinosaurs/Room/RoomInfo.cs</url>
|
||||
<line>72</line>
|
||||
<properties documentPath="D:\UnityProject\TestF\Assets\Scripts\Dinosaurs\Room\RoomInfo.cs" initialLine="72" containingFunctionPresentation="Method 'UpdateNumber'">
|
||||
<startOffsets>
|
||||
<option value="4424" />
|
||||
<option value="1990" />
|
||||
</startOffsets>
|
||||
<endOffsets>
|
||||
<option value="4444" />
|
||||
<option value="2025" />
|
||||
</endOffsets>
|
||||
</properties>
|
||||
<option name="timeStamp" value="18" />
|
||||
<option name="timeStamp" value="42" />
|
||||
</line-breakpoint>
|
||||
<line-breakpoint enabled="true" type="DotNet Breakpoints">
|
||||
<url>file://$PROJECT_DIR$/Assets/Scripts/Dinosaurs/Room/RoomData.cs</url>
|
||||
<line>39</line>
|
||||
<properties documentPath="D:\UnityProject\TestF\Assets\Scripts\Dinosaurs\Room\RoomData.cs" initialLine="39" containingFunctionPresentation="Method 'RefreshMoney'">
|
||||
<startOffsets>
|
||||
<option value="1005" />
|
||||
</startOffsets>
|
||||
<endOffsets>
|
||||
<option value="1031" />
|
||||
</endOffsets>
|
||||
</properties>
|
||||
<option name="timeStamp" value="43" />
|
||||
</line-breakpoint>
|
||||
<line-breakpoint enabled="true" type="DotNet Breakpoints">
|
||||
<url>file://$PROJECT_DIR$/Assets/Scripts/Dinosaurs/Room/Room.cs</url>
|
||||
<line>102</line>
|
||||
<properties documentPath="D:\UnityProject\TestF\Assets\Scripts\Dinosaurs\Room\Room.cs" initialLine="102" containingFunctionPresentation="Method 'RefreshMoney'">
|
||||
<startOffsets>
|
||||
<option value="2974" />
|
||||
</startOffsets>
|
||||
<endOffsets>
|
||||
<option value="3010" />
|
||||
</endOffsets>
|
||||
</properties>
|
||||
<option name="timeStamp" value="55" />
|
||||
</line-breakpoint>
|
||||
<line-breakpoint enabled="true" type="DotNet Breakpoints">
|
||||
<url>file://$PROJECT_DIR$/Assets/Scripts/Dinosaurs/Player/PlayerInfo.cs</url>
|
||||
<line>69</line>
|
||||
<properties documentPath="D:\UnityProject\TestF\Assets\Scripts\Dinosaurs\Player\PlayerInfo.cs" initialLine="69" containingFunctionPresentation="Method 'JumpTo'">
|
||||
<startOffsets>
|
||||
<option value="2094" />
|
||||
</startOffsets>
|
||||
<endOffsets>
|
||||
<option value="2126" />
|
||||
</endOffsets>
|
||||
</properties>
|
||||
<option name="timeStamp" value="72" />
|
||||
</line-breakpoint>
|
||||
</breakpoints>
|
||||
</breakpoint-manager>
|
||||
|
|
|
@ -0,0 +1,49 @@
|
|||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using Newtonsoft.Json;
|
||||
using Sirenix.OdinInspector;
|
||||
using Sirenix.OdinInspector.Editor;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Editor.GenResourcePathEditor
|
||||
{
|
||||
public class GenNetworkDataEditor : OdinEditorWindow
|
||||
{
|
||||
[UnityEditor.MenuItem("Tool/ZC/GenNetworkDataEditor")]
|
||||
private static void OpenWindow()
|
||||
{
|
||||
GetWindow<GenNetworkDataEditor>().Show();
|
||||
}
|
||||
|
||||
|
||||
[Button]
|
||||
void GenConfig(string name)
|
||||
{
|
||||
object a = 1;
|
||||
string type = a.GetType().ToString();
|
||||
Debug.Log(type);
|
||||
}
|
||||
}
|
||||
|
||||
public class MessageDataInfo
|
||||
{
|
||||
public MessageType messageType;
|
||||
public MessageInfoType messageInfoType;
|
||||
}
|
||||
|
||||
public enum MessageInfoType
|
||||
{
|
||||
String,
|
||||
Int,
|
||||
Float,
|
||||
Bool,
|
||||
List,
|
||||
}
|
||||
|
||||
public enum MessageType
|
||||
{
|
||||
S2C,
|
||||
C2S
|
||||
}
|
||||
}
|
|
@ -0,0 +1,3 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 9d89cb6341114d40ad785108692fc1a7
|
||||
timeCreated: 1714369678
|
|
@ -107,7 +107,7 @@ MonoBehaviour:
|
|||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1928958306448764622}
|
||||
m_Enabled: 1
|
||||
m_Enabled: 0
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3}
|
||||
m_Name:
|
||||
|
@ -379,7 +379,7 @@ MonoBehaviour:
|
|||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_text: "\u200B"
|
||||
m_text: "123\u200B"
|
||||
m_isRightToLeft: 0
|
||||
m_fontAsset: {fileID: 11400000, guid: 77aa97af632c6664fba601ee0bd95449, type: 2}
|
||||
m_sharedMaterial: {fileID: -8700875382889012724, guid: 77aa97af632c6664fba601ee0bd95449, type: 2}
|
||||
|
@ -823,7 +823,7 @@ MonoBehaviour:
|
|||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_text: "\u200B"
|
||||
m_text: "123\u200B"
|
||||
m_isRightToLeft: 0
|
||||
m_fontAsset: {fileID: 11400000, guid: 77aa97af632c6664fba601ee0bd95449, type: 2}
|
||||
m_sharedMaterial: {fileID: -8700875382889012724, guid: 77aa97af632c6664fba601ee0bd95449, type: 2}
|
||||
|
@ -1272,7 +1272,7 @@ MonoBehaviour:
|
|||
m_CaretColor: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1}
|
||||
m_CustomCaretColor: 0
|
||||
m_SelectionColor: {r: 0.65882355, g: 0.80784315, b: 1, a: 0.7529412}
|
||||
m_Text:
|
||||
m_Text: 123
|
||||
m_CaretBlinkRate: 0.85
|
||||
m_CaretWidth: 1
|
||||
m_ReadOnly: 0
|
||||
|
@ -1473,7 +1473,7 @@ MonoBehaviour:
|
|||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 7067369223441573487}
|
||||
m_Enabled: 1
|
||||
m_Enabled: 0
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3}
|
||||
m_Name:
|
||||
|
@ -1740,7 +1740,7 @@ MonoBehaviour:
|
|||
m_CaretColor: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1}
|
||||
m_CustomCaretColor: 0
|
||||
m_SelectionColor: {r: 0.65882355, g: 0.80784315, b: 1, a: 0.7529412}
|
||||
m_Text:
|
||||
m_Text: 123
|
||||
m_CaretBlinkRate: 0.85
|
||||
m_CaretWidth: 1
|
||||
m_ReadOnly: 0
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -671,7 +671,7 @@ MonoBehaviour:
|
|||
m_Script: {fileID: 11500000, guid: f686a7b9730c4ed187bf6d12c45cde2b, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
_loadType1: 1
|
||||
_loadType1: 0
|
||||
time: 0
|
||||
--- !u!114 &1321366408
|
||||
MonoBehaviour:
|
||||
|
@ -1069,6 +1069,7 @@ GameObject:
|
|||
m_Component:
|
||||
- component: {fileID: 2142424751}
|
||||
- component: {fileID: 2142424750}
|
||||
- component: {fileID: 2142424752}
|
||||
m_Layer: 0
|
||||
m_Name: '*************Test**************'
|
||||
m_TagString: Untagged
|
||||
|
@ -1108,6 +1109,18 @@ Transform:
|
|||
m_Father: {fileID: 1321366406}
|
||||
m_RootOrder: 4
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!114 &2142424752
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2142424749}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: f08e0c8f26e34bcbbd363349498d8f7d, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
--- !u!222 &693992134497071616
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 8b1b3f07788940c784d8124a7a4dae49
|
||||
timeCreated: 1714792539
|
|
@ -0,0 +1,12 @@
|
|||
namespace Game.Data
|
||||
{
|
||||
/// <summary>
|
||||
/// 服务器主动推送的消息
|
||||
/// </summary>
|
||||
public class PassiveResponse
|
||||
{
|
||||
public string messageType { get; set; }
|
||||
public string sendType { get; set; }
|
||||
public object data { get; set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,3 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 1d58dbc2e1f74f14bfa4b99b9a2de3ee
|
||||
timeCreated: 1714792637
|
|
@ -0,0 +1,20 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Game.Data
|
||||
{
|
||||
public class S2C_BossStartAttack : PassiveResponse
|
||||
{
|
||||
public new S2C_BossStartAttackInfo data;
|
||||
|
||||
public class S2C_BossStartAttackInfo
|
||||
{
|
||||
public string lunId;
|
||||
public int attack_count;
|
||||
public int attack_seconds;
|
||||
public DateTime attack_time;
|
||||
public int[] attack_room;
|
||||
public List<S2C_RoomDataRefresh.RoomInfo> roomList = new List<S2C_RoomDataRefresh.RoomInfo>();
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,3 @@
|
|||
fileFormatVersion: 2
|
||||
guid: d5b69db942d74475b7c26cbaf0f0518d
|
||||
timeCreated: 1714715070
|
|
@ -0,0 +1,14 @@
|
|||
namespace Game.Data
|
||||
{
|
||||
public class S2C_NewPlayerJoin : PassiveResponse
|
||||
{
|
||||
public new S2C_NewPlayerJoinInfo data;
|
||||
|
||||
public class S2C_NewPlayerJoinInfo
|
||||
{
|
||||
public string lunId;
|
||||
public string nickname;
|
||||
public int uid;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,3 @@
|
|||
fileFormatVersion: 2
|
||||
guid: f8f14e376ce942a69f1d3061caec6fd6
|
||||
timeCreated: 1714803699
|
|
@ -0,0 +1,13 @@
|
|||
namespace Game.Data
|
||||
{
|
||||
public class S2C_OtherActiveExitGame : PassiveResponse
|
||||
{
|
||||
public new S2C_OtherActiveExitGameInfo data;
|
||||
|
||||
public class S2C_OtherActiveExitGameInfo
|
||||
{
|
||||
public string lunId;
|
||||
public int uid;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,3 @@
|
|||
fileFormatVersion: 2
|
||||
guid: ace4765024534ec49885b9d0775ae0f8
|
||||
timeCreated: 1714807510
|
|
@ -0,0 +1,13 @@
|
|||
namespace Game.Data
|
||||
{
|
||||
public class S2C_OtherPassiveExitGame : PassiveResponse
|
||||
{
|
||||
public new S2C_OtherPassiveExitGameInfo data;
|
||||
|
||||
public class S2C_OtherPassiveExitGameInfo
|
||||
{
|
||||
public int uid;
|
||||
public string msg;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,3 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 0b9e8a4df61949c58e1b5bdf45e30c64
|
||||
timeCreated: 1714812718
|
|
@ -0,0 +1,14 @@
|
|||
namespace Game.Data
|
||||
{
|
||||
public class S2C_PlayerSwitchRoom : PassiveResponse
|
||||
{
|
||||
public new S2C_PlayerSwitchRoomInfo data;
|
||||
|
||||
public class S2C_PlayerSwitchRoomInfo
|
||||
{
|
||||
public string lunId;
|
||||
public int roomId;
|
||||
public long uId;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,3 @@
|
|||
fileFormatVersion: 2
|
||||
guid: fc676c7868304dba969a7844d73977f0
|
||||
timeCreated: 1714703031
|
|
@ -0,0 +1,22 @@
|
|||
using System.Collections.Generic;
|
||||
|
||||
namespace Game.Data
|
||||
{
|
||||
public class S2C_RoomDataRefresh : PassiveResponse
|
||||
{
|
||||
public new S2C_RoomDataRefreshInfo data;
|
||||
|
||||
public class S2C_RoomDataRefreshInfo
|
||||
{
|
||||
public string lunId;
|
||||
public List<RoomInfo> roomList = new List<RoomInfo>();
|
||||
}
|
||||
|
||||
|
||||
public struct RoomInfo
|
||||
{
|
||||
public int roomId;
|
||||
public float moneys;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,3 @@
|
|||
fileFormatVersion: 2
|
||||
guid: e4327100e762441e8827b0f1c8c70fb8
|
||||
timeCreated: 1714701481
|
|
@ -0,0 +1,15 @@
|
|||
using System;
|
||||
|
||||
namespace Game.Data
|
||||
{
|
||||
public class S2C_StartNewGame : PassiveResponse
|
||||
{
|
||||
public new S2C_StartNewGameInfo data;
|
||||
|
||||
public class S2C_StartNewGameInfo
|
||||
{
|
||||
public string lunId;
|
||||
public DateTime nowTime;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,3 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 491fe8995b2045fbaff1f6241d6f822c
|
||||
timeCreated: 1714718196
|
|
@ -0,0 +1,3 @@
|
|||
fileFormatVersion: 2
|
||||
guid: afd9abb2983f4c1c85527050246e78ab
|
||||
timeCreated: 1714792523
|
|
@ -0,0 +1,11 @@
|
|||
namespace Game.Data
|
||||
{
|
||||
public class C2S_Betting : Request
|
||||
{
|
||||
public new string info = "kl";
|
||||
public new string labelName = "additionalBet";
|
||||
public string lunId;
|
||||
public string roomId;
|
||||
public float money;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,3 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 697c74c9826841c8a31198c050ff52c2
|
||||
timeCreated: 1714701296
|
|
@ -0,0 +1,9 @@
|
|||
namespace Game.Data
|
||||
{
|
||||
public class C2S_EnterGameData : Request
|
||||
{
|
||||
public new string info = "kl";
|
||||
public new string labelName = "enterLun";
|
||||
public string enterLun;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,3 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 51c04450a5d54142ab7281dab8319fd9
|
||||
timeCreated: 1714367234
|
|
@ -0,0 +1,9 @@
|
|||
namespace Game.Data
|
||||
{
|
||||
public class C2S_ExitGame : Request
|
||||
{
|
||||
public new string info = "kl";
|
||||
public new string labelName = "exitKl";
|
||||
public string lunId;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,3 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 289a1b3b8f974e4088d31efb37843523
|
||||
timeCreated: 1714807380
|
|
@ -0,0 +1,10 @@
|
|||
namespace Game.Data
|
||||
{
|
||||
public class C2S_JoinRoom : Request
|
||||
{
|
||||
public new string info = "kl";
|
||||
public new string labelName = "toggleRoom";
|
||||
public string lunId;
|
||||
public string roomId;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,3 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 7497f25ae4334079872342303137bfcd
|
||||
timeCreated: 1714701283
|
|
@ -0,0 +1,9 @@
|
|||
namespace Game.Data
|
||||
{
|
||||
public class C2S_Login : Request
|
||||
{
|
||||
public new string info = "common";
|
||||
public new string labelName = "login";
|
||||
public string token;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,3 @@
|
|||
fileFormatVersion: 2
|
||||
guid: b9e313851d3441c1a3508c6b82d54f28
|
||||
timeCreated: 1714701310
|
|
@ -0,0 +1,10 @@
|
|||
namespace Game.Data
|
||||
{
|
||||
// 请求
|
||||
public class Request
|
||||
{
|
||||
public string requestKey { get; set; }
|
||||
public string info { get; set; }
|
||||
public string labelName { get; set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,3 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 8513fa48eeea418c857edfd3b4fcd5d1
|
||||
timeCreated: 1714701369
|
|
@ -0,0 +1,3 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 6e693433642d44b5aad041dba492a991
|
||||
timeCreated: 1714792534
|
|
@ -0,0 +1,16 @@
|
|||
namespace Game.Data
|
||||
{
|
||||
public enum ResponseCode
|
||||
{
|
||||
Success = 0,
|
||||
Error,
|
||||
}
|
||||
|
||||
// 接收
|
||||
public class Response
|
||||
{
|
||||
public ResponseCode code { get; set; }
|
||||
public string requestKey { get; set; }
|
||||
public object data { get; set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,3 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 1cbf3b59b81a434ba4be0c36408487bd
|
||||
timeCreated: 1714701339
|
|
@ -0,0 +1,9 @@
|
|||
namespace Game.Data
|
||||
{
|
||||
public class S2C_Balance : Response
|
||||
{
|
||||
public string lunId;
|
||||
public float receive_money;
|
||||
public float money;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,3 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 1eda385e04464bf8a890c020176d862a
|
||||
timeCreated: 1714717093
|
|
@ -0,0 +1,6 @@
|
|||
namespace Game.Data
|
||||
{
|
||||
public class S2C_Betting : Response
|
||||
{
|
||||
}
|
||||
}
|
|
@ -0,0 +1,3 @@
|
|||
fileFormatVersion: 2
|
||||
guid: df827814fd7348f7bbc3d69954721f13
|
||||
timeCreated: 1714701302
|
|
@ -0,0 +1,54 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Game.Data
|
||||
{
|
||||
public class S2C_EnterGameData : Response
|
||||
{
|
||||
public new EnterGameDataInfo data;
|
||||
|
||||
public struct EnterGameDataInfo
|
||||
{
|
||||
public string lunId;
|
||||
|
||||
public GameState state;
|
||||
|
||||
public int lunSelectSeconds;
|
||||
|
||||
public int lunAttackSeconds;
|
||||
|
||||
public DateTime nowTime;
|
||||
|
||||
public DateTime attackTime;
|
||||
|
||||
public DateTime created_at;
|
||||
|
||||
public List<int> attackRoom;
|
||||
|
||||
public List<RoomInfo> roomInfoList;
|
||||
|
||||
public List<UserInfo> outUserList;
|
||||
|
||||
public struct RoomInfo
|
||||
{
|
||||
public int id;
|
||||
public string name;
|
||||
public float money;
|
||||
public List<UserInfo> userList;
|
||||
}
|
||||
|
||||
public struct UserInfo
|
||||
{
|
||||
public long uid;
|
||||
public string nickname;
|
||||
}
|
||||
}
|
||||
|
||||
public enum GameState
|
||||
{
|
||||
选择房间中 = 0,
|
||||
已结束,
|
||||
恐龙袭击中,
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,3 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 42b3b25d5c1d4ced97b597f88e52bf67
|
||||
timeCreated: 1714701274
|
|
@ -0,0 +1,6 @@
|
|||
namespace Game.Data
|
||||
{
|
||||
public class S2C_ExitGame : Response
|
||||
{
|
||||
}
|
||||
}
|
|
@ -0,0 +1,3 @@
|
|||
fileFormatVersion: 2
|
||||
guid: bf7855d956454360b6d92d45fc6a97cd
|
||||
timeCreated: 1714807406
|
|
@ -0,0 +1,6 @@
|
|||
namespace Game.Data
|
||||
{
|
||||
public class S2C_JoinRoom : Response
|
||||
{
|
||||
}
|
||||
}
|
|
@ -0,0 +1,3 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 53d48462d228485ca1aea3257a3ae646
|
||||
timeCreated: 1714701288
|
|
@ -0,0 +1,7 @@
|
|||
namespace Game.Data
|
||||
{
|
||||
public class S2C_Login : Response
|
||||
{
|
||||
public new GlobalPlayerData data;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,3 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 2932f2961835456e9313f3aee2305ce1
|
||||
timeCreated: 1714701316
|
|
@ -66,7 +66,7 @@ namespace Game.Boss
|
|||
{
|
||||
var wayPoints = this._bfsManager.FindPath(this._info.birthPoint, _room.roomInfo.room_Center);
|
||||
await this.MoveAsync(wayPoints, token);
|
||||
Debug.Log("Move finish !!!");
|
||||
// Debug.Log("Move finish !!!");
|
||||
await this._info.Kill(token);
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -12,7 +12,8 @@ namespace Game.Boss
|
|||
IReadOnlyList<IBoss> bosses { get; }
|
||||
IBFSManager bfsManager { get; }
|
||||
|
||||
UniTask MoveToKillPlayerAsync(IReadOnlyList<IRoom> rooms, CancellationToken token);
|
||||
void CreateBoss(IReadOnlyList<IRoom> rooms);
|
||||
UniTask MoveToKillPlayerAsync(CancellationToken token);
|
||||
void DeleteBoss();
|
||||
}
|
||||
|
||||
|
@ -31,7 +32,7 @@ namespace Game.Boss
|
|||
this._bfsManager = bfsManager;
|
||||
}
|
||||
|
||||
public async UniTask MoveToKillPlayerAsync(IReadOnlyList<IRoom> rooms, CancellationToken token)
|
||||
public void CreateBoss(IReadOnlyList<IRoom> rooms)
|
||||
{
|
||||
this._bosses = new List<IBoss>();
|
||||
foreach (var room in rooms)
|
||||
|
@ -41,7 +42,10 @@ namespace Game.Boss
|
|||
boss.Init();
|
||||
_bosses.Add(boss);
|
||||
}
|
||||
}
|
||||
|
||||
public async UniTask MoveToKillPlayerAsync(CancellationToken token)
|
||||
{
|
||||
List<UniTask> uniTasks = new List<UniTask>();
|
||||
foreach (var boss in this._bosses)
|
||||
{
|
||||
|
|
|
@ -1,10 +1,14 @@
|
|||
using System.Collections.Generic;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Cysharp.Threading.Tasks;
|
||||
using Game.Boss;
|
||||
using Game.Data;
|
||||
using Game.Pathfinding;
|
||||
using Game.Player;
|
||||
using Game.RayCast;
|
||||
using Game.Room;
|
||||
using Newtonsoft.Json;
|
||||
using UnityEngine;
|
||||
using UnityEngine.SceneManagement;
|
||||
|
||||
|
@ -12,13 +16,30 @@ namespace Game.Dinosaurs
|
|||
{
|
||||
public class DinosaursGameManager : IDinosaursGameManager
|
||||
{
|
||||
// private bool isInit;
|
||||
private bool isInitFinish;
|
||||
private bool isPlaying;
|
||||
|
||||
private bool isInBalance;
|
||||
private float currentTime = 0f;
|
||||
private float bossRefreshTime = 20f;
|
||||
|
||||
// private float currentTime = 0f;
|
||||
// private float bossRefreshTime = 20f;
|
||||
private GameSceneMainUI sceneMainUI;
|
||||
|
||||
// game data
|
||||
private S2C_EnterGameData.EnterGameDataInfo data;
|
||||
|
||||
// game public
|
||||
public string lunId => this.data.lunId;
|
||||
private S2C_EnterGameData.GameState state => this.data.state;
|
||||
private int lunSelectSeconds => this.data.lunSelectSeconds;
|
||||
private int lunAttackSeconds => this.data.lunAttackSeconds;
|
||||
private DateTime nowTime => this.data.nowTime;
|
||||
private DateTime attackTime => this.data.attackTime;
|
||||
private DateTime created_at => this.data.created_at;
|
||||
private List<int> attackRoom => this.data.attackRoom;
|
||||
private List<S2C_EnterGameData.EnterGameDataInfo.RoomInfo> roomInfoList => this.data.roomInfoList;
|
||||
private List<S2C_EnterGameData.EnterGameDataInfo.UserInfo> outUserList => this.data.outUserList;
|
||||
|
||||
private BFSManager _bfsManager;
|
||||
private MouseInputManager _mouseInputManager;
|
||||
private BossManager _bossManager;
|
||||
|
@ -49,6 +70,7 @@ namespace Game.Dinosaurs
|
|||
this._playerManager = new PlayerManager(this.bfsManager);
|
||||
this._roomManager = new RoomManager();
|
||||
this._robotManager = new RobotManager(this.bfsManager, this.roomManager);
|
||||
isInitFinish = false;
|
||||
}
|
||||
|
||||
public void Init()
|
||||
|
@ -63,15 +85,13 @@ namespace Game.Dinosaurs
|
|||
|
||||
public void StartGame()
|
||||
{
|
||||
// this.StartGameAsync().Forget();
|
||||
this.isInBalance = false;
|
||||
this.isPlaying = true;
|
||||
this.currentTime = 0;
|
||||
|
||||
sceneMainUI = Game.uiManager.GetUI<GameSceneMainUI>(UIType.GameSceneMainUI);
|
||||
//
|
||||
this.LoadGameSceneAsync().Forget();
|
||||
|
||||
EventManager.Instance.Subscribe(InputObjectFinishEventArgs.EventId, InputObjectFinishEvent);
|
||||
sceneMainUI = Game.uiManager.GetUI<GameSceneMainUI>(UIType.GameSceneMainUI);
|
||||
}
|
||||
|
||||
#region StartGame
|
||||
|
@ -81,36 +101,84 @@ namespace Game.Dinosaurs
|
|||
await Game.resourceManager.LoadSceneAsync(AssetConstPath.Assets_GameRes_Scene_Game, LoadSceneMode.Additive);
|
||||
EventManager.Instance.FireNow(this, new LoadingGameSceneFinishEventArgs(true));
|
||||
|
||||
var player = this._playerManager.CreatePlayer(Game.currentPlayerData.name, Game.currentPlayerData.jinBei);
|
||||
this._playerManager.SetCurrentPlayer(player);
|
||||
EventManager.Instance.FireNow(this, new InitCurrentPlayerDataEventArgs(player));
|
||||
player.self.transform.position = new Vector3(-9.6f, -10.3f);
|
||||
Game.uiManager.ShowUI(UIType.GameSceneMainUI);
|
||||
|
||||
await this.CreateRoomAsync();
|
||||
}
|
||||
|
||||
async UniTask CreateRoomAsync()
|
||||
{
|
||||
var room = this._roomManager.CreateRoom(RoomType.出生点, AssetConstPath.Assets_GameRes_Prefabs_Room_出生点);
|
||||
this._roomManager.CreateRoom(RoomType.伏龙阁, AssetConstPath.Assets_GameRes_Prefabs_Room_伏龙阁);
|
||||
this._roomManager.CreateRoom(RoomType.杂物室, AssetConstPath.Assets_GameRes_Prefabs_Room_杂物室);
|
||||
this._roomManager.CreateRoom(RoomType.训练堂, AssetConstPath.Assets_GameRes_Prefabs_Room_训练堂);
|
||||
this._roomManager.CreateRoom(RoomType.先祖大厅, AssetConstPath.Assets_GameRes_Prefabs_Room_先祖大厅);
|
||||
this._roomManager.CreateRoom(RoomType.圣龙残骸, AssetConstPath.Assets_GameRes_Prefabs_Room_圣龙残骸);
|
||||
this._roomManager.CreateRoom(RoomType.天池遗址, AssetConstPath.Assets_GameRes_Prefabs_Room_天池遗址);
|
||||
this._roomManager.CreateRoom(RoomType.沙慕龙阁, AssetConstPath.Assets_GameRes_Prefabs_Room_沙慕龙阁);
|
||||
this._roomManager.CreateRoom(RoomType.英雄圣殿, AssetConstPath.Assets_GameRes_Prefabs_Room_英雄圣殿);
|
||||
|
||||
var player = this._playerManager.currentPlayer;
|
||||
await player.WaitMoveRoomAsync(room, default);
|
||||
|
||||
this.CreateOtherPlayer();
|
||||
// Game.procedureManager.ChangeProcedure(ProcedureType.GameSceneLogicProcedure);
|
||||
}
|
||||
|
||||
void CreateOtherPlayer()
|
||||
{
|
||||
Game.socketManager.SendMessage(new C2S_EnterGameData(), json =>
|
||||
{
|
||||
var s2CEnterGameData = JsonConvert.DeserializeObject<S2C_EnterGameData>(json);
|
||||
var enterGameDataInfo = s2CEnterGameData.data;
|
||||
this.data = enterGameDataInfo;
|
||||
|
||||
foreach (var roomInfo in enterGameDataInfo.roomInfoList)
|
||||
{
|
||||
string path = default;
|
||||
|
||||
if (roomInfo.id == 1) path = AssetConstPath.Assets_GameRes_Prefabs_Room_伏龙阁;
|
||||
else if (roomInfo.id == 2) path = AssetConstPath.Assets_GameRes_Prefabs_Room_杂物室;
|
||||
else if (roomInfo.id == 3) path = AssetConstPath.Assets_GameRes_Prefabs_Room_沙慕龙阁;
|
||||
else if (roomInfo.id == 4) path = AssetConstPath.Assets_GameRes_Prefabs_Room_圣龙残骸;
|
||||
else if (roomInfo.id == 5) path = AssetConstPath.Assets_GameRes_Prefabs_Room_英雄圣殿;
|
||||
else if (roomInfo.id == 6) path = AssetConstPath.Assets_GameRes_Prefabs_Room_先祖大厅;
|
||||
else if (roomInfo.id == 7) path = AssetConstPath.Assets_GameRes_Prefabs_Room_天池遗址;
|
||||
else if (roomInfo.id == 8) path = AssetConstPath.Assets_GameRes_Prefabs_Room_训练堂;
|
||||
|
||||
var room1 = this._roomManager.CreateRoom((RoomType)roomInfo.id, path, roomInfo.money);
|
||||
foreach (var userInfo in roomInfo.userList)
|
||||
{
|
||||
var player = this._playerManager.CreatePlayer(userInfo.uid, userInfo.nickname, RoleType.Robot);
|
||||
// var player = this._robotManager.CreateRobot(userInfo.uid, userInfo.name);
|
||||
player.JumpToRoom(room1);
|
||||
}
|
||||
}
|
||||
|
||||
var room2 = this._roomManager.CreateRoom(RoomType.出生点, AssetConstPath.Assets_GameRes_Prefabs_Room_出生点, 0);
|
||||
foreach (var userInfo in enterGameDataInfo.outUserList)
|
||||
{
|
||||
var player = this._playerManager.CreatePlayer(userInfo.uid, userInfo.nickname, RoleType.Robot);
|
||||
player.JumpToRoom(room2);
|
||||
}
|
||||
|
||||
this._roomManager.SetCurrentRoom(RoomType.出生点);
|
||||
|
||||
var ma = this._playerManager.CreatePlayer(Game.currentPlayerData.uId, Game.currentPlayerData.nickname, RoleType.Player);
|
||||
this._playerManager.SetCurrentPlayer(ma);
|
||||
EventManager.Instance.FireNow(this, new InitCurrentPlayerDataEventArgs(ma));
|
||||
this._roomManager.JoinRoomAsync(RoomType.出生点, ma, default).Forget();
|
||||
|
||||
Debug.Log(enterGameDataInfo.state);
|
||||
switch (enterGameDataInfo.state)
|
||||
{
|
||||
case S2C_EnterGameData.GameState.选择房间中:
|
||||
var timeSpan = this.nowTime - this.created_at;
|
||||
int chooseTime = (int)MathF.Abs(timeSpan.Seconds);
|
||||
this.maxChooseRoomTime = chooseTime < lunSelectSeconds ? chooseTime : lunSelectSeconds;
|
||||
this.currentTime = maxChooseRoomTime;
|
||||
break;
|
||||
case S2C_EnterGameData.GameState.已结束:
|
||||
break;
|
||||
case S2C_EnterGameData.GameState.恐龙袭击中:
|
||||
var span = this.nowTime - this.attackTime;
|
||||
int attackTime = (int)MathF.Abs(span.Seconds);
|
||||
this.maxAttackTime = attackTime < lunAttackSeconds ? attackTime : lunAttackSeconds;
|
||||
this.currentTime = maxAttackTime;
|
||||
break;
|
||||
default:
|
||||
throw new ArgumentOutOfRangeException();
|
||||
}
|
||||
|
||||
Game.uiManager.ShowUI(UIType.GameSceneMainUI);
|
||||
this.sceneMainUI.SetDinosaursGame(this);
|
||||
|
||||
EventManager.Instance.Subscribe(InputObjectFinishEventArgs.EventId, InputObjectFinishEvent);
|
||||
EventManager.Instance.Subscribe(ClickBettingButton_ToDinosaursEventArgs.EventId, ClickBettingButton_ToDinosaursEvent);
|
||||
EventManager.Instance.Subscribe(NetworkMessageEventArgs.EventId, NetworkMessageEvent);
|
||||
|
||||
isInitFinish = true;
|
||||
isCanTimer = true;
|
||||
});
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
@ -118,104 +186,205 @@ namespace Game.Dinosaurs
|
|||
|
||||
public void UpdateGame(float time)
|
||||
{
|
||||
if (!isPlaying) return; // this.isInBalance ||
|
||||
this.UpdateTime();
|
||||
|
||||
this._bfsManager.Update(time);
|
||||
this._mouseInputManager.Update(time);
|
||||
this._bossManager.Update(time);
|
||||
this._playerManager.Update(time);
|
||||
this._roomManager.Update(time);
|
||||
this._robotManager.Update(time);
|
||||
|
||||
if (this.isInBalance || !isPlaying) return;
|
||||
|
||||
WaitTimeGoNext();
|
||||
}
|
||||
|
||||
void WaitTimeGoNext()
|
||||
private float currentTime = 0;
|
||||
private float maxChooseRoomTime;
|
||||
private float maxAttackTime;
|
||||
private bool isCanTimer;
|
||||
|
||||
void UpdateTime()
|
||||
{
|
||||
this.currentTime += Time.deltaTime;
|
||||
|
||||
string content = $"({(int)(this.bossRefreshTime - currentTime)}) 恐龙即将出现!";
|
||||
sceneMainUI.UpdateMessage(content);
|
||||
|
||||
if (this.currentTime >= this.bossRefreshTime)
|
||||
if (!isCanTimer) return;
|
||||
this.currentTime -= Time.deltaTime;
|
||||
if (this.currentTime <= 0)
|
||||
{
|
||||
this.WaitBalance().Forget();
|
||||
return;
|
||||
// Game.procedureManager.ChangeProcedure(ProcedureType.GameSceneKillPlayerProcedure);
|
||||
isCanTimer = false;
|
||||
this.currentTime = 0;
|
||||
}
|
||||
|
||||
switch (this.state)
|
||||
{
|
||||
case S2C_EnterGameData.GameState.选择房间中:
|
||||
string content = $"({currentTime:F0}) 恐龙即将出现!";
|
||||
sceneMainUI.UpdateMessage(content);
|
||||
|
||||
this.sceneMainUI.IsShowTips(this.currentTime <= 3 && this.currentTime > 0);
|
||||
|
||||
break;
|
||||
case S2C_EnterGameData.GameState.已结束:
|
||||
content = $"结算中!";
|
||||
sceneMainUI.UpdateMessage(content);
|
||||
break;
|
||||
case S2C_EnterGameData.GameState.恐龙袭击中:
|
||||
content = $"({currentTime:F0}) 恐龙出没!";
|
||||
sceneMainUI.UpdateMessage(content);
|
||||
break;
|
||||
default:
|
||||
throw new ArgumentOutOfRangeException();
|
||||
}
|
||||
}
|
||||
|
||||
async UniTask WaitBalance()
|
||||
// async UniTask WaitBalance()
|
||||
// {
|
||||
// this.isInBalance = true;
|
||||
//
|
||||
// string content = $"恐龙出没!";
|
||||
// sceneMainUI.UpdateMessage(content);
|
||||
//
|
||||
// var roomData = this._roomManager.GetAttackRoom();
|
||||
// await this._bossManager.MoveToKillPlayerAsync(roomData.killRoom, default);
|
||||
//
|
||||
// this._bossManager.DeleteBoss();
|
||||
//
|
||||
// float jinBei = 0;
|
||||
// foreach (var room in roomData.killRoom)
|
||||
// {
|
||||
// jinBei += room.roomData.jinBeiCount;
|
||||
// }
|
||||
//
|
||||
// Debug.Log($"杀掉了随机房间玩家,金贝数量总和为:{jinBei}");
|
||||
//
|
||||
// List<IPlayer> players = new List<IPlayer>();
|
||||
// foreach (var room in roomData.survivorRoom)
|
||||
// {
|
||||
// foreach (var roomPlayer in room.players)
|
||||
// {
|
||||
// Debug.Log($"幸存者:{roomPlayer.playerName}");
|
||||
// players.Add(roomPlayer);
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// float roleJinBei = 0;
|
||||
// if (players.Count > 0)
|
||||
// roleJinBei = jinBei / players.Count;
|
||||
//
|
||||
//// Debug.Log($"胜利总金贝: is {jinBei}");
|
||||
//// EventManager.Instance.FireNow(this, new JinBeiSettlementEventArgs(players, jinBei));
|
||||
// CentsJinBei(players, roleJinBei);
|
||||
//
|
||||
// var resultUI = Game.uiManager.GetUI<GameSceneResultUI>(UIType.GameSceneResultUI);
|
||||
// if (players.Contains(this._playerManager.currentPlayer))
|
||||
// resultUI.SetResult($"恭喜你躲避成功,胜利总金贝:{jinBei},你得到的金贝:{roleJinBei}", true);
|
||||
// else
|
||||
// resultUI.SetResult($"躲避失败,胜利总金贝:{jinBei},你得到的金贝:0", false);
|
||||
//
|
||||
// //TODO:
|
||||
// UniTask.Create(async () => { await this._roomManager.QuitAllRoomAsync(default); });
|
||||
//
|
||||
//// this.currentTime = 0;
|
||||
// this.isInBalance = false;
|
||||
//
|
||||
// await this.WaitShowResultAsync();
|
||||
// }
|
||||
//
|
||||
// async UniTask WaitShowResultAsync()
|
||||
// {
|
||||
// var showUI = Game.uiManager.ShowUI(UIType.GameSceneResultUI);
|
||||
// var resultUI = showUI as GameSceneResultUI;
|
||||
// await resultUI.WaitShowAndCloseResultAsync(default);
|
||||
// Game.uiManager.CloseLast();
|
||||
//
|
||||
// //
|
||||
// this._robotManager.EndOfTurnAuto();
|
||||
// }
|
||||
//
|
||||
// void CentsJinBei(List<IPlayer> players, float f)
|
||||
// {
|
||||
// foreach (var player in players)
|
||||
// {
|
||||
// EventManager.Instance.FireNow(this, new PlayerJinBeiChange_VictoryEventArgs(player, f));
|
||||
// }
|
||||
// }
|
||||
|
||||
#region boss attack
|
||||
|
||||
void CreateBoss(S2C_BossStartAttack startAttack)
|
||||
{
|
||||
var randomRoomData = this._roomManager.GetAttackRoom(startAttack.data.attack_room);
|
||||
_bossManager.CreateBoss(randomRoomData.killRoom);
|
||||
Attack(startAttack, randomRoomData).Forget();
|
||||
}
|
||||
|
||||
async UniTask Attack(S2C_BossStartAttack startAttack, RandomRoomData randomRoomData)
|
||||
{
|
||||
this.isInBalance = true;
|
||||
|
||||
string content = $"恐龙出没!";
|
||||
sceneMainUI.UpdateMessage(content);
|
||||
float jinBei = 0;
|
||||
|
||||
var roomData = this._roomManager.GetAllRandomRoom();
|
||||
await this._bossManager.MoveToKillPlayerAsync(roomData.killRoom, default);
|
||||
foreach (var i in startAttack.data.attack_room)
|
||||
{
|
||||
jinBei += startAttack.data.roomList[i - 1].moneys;
|
||||
}
|
||||
|
||||
await this._bossManager.MoveToKillPlayerAsync(default);
|
||||
this._bossManager.DeleteBoss();
|
||||
|
||||
float jinBei = 0;
|
||||
foreach (var room in roomData.killRoom)
|
||||
if (this._roomManager.currentRoom == null || this._roomManager.currentRoom.roomType == RoomType.出生点)
|
||||
{
|
||||
jinBei += room.roomData.jinBeiCount;
|
||||
balanceNum = 0;
|
||||
}
|
||||
|
||||
Debug.Log($"杀掉了随机房间玩家,金贝数量总和为:{jinBei}");
|
||||
|
||||
List<IPlayer> players = new List<IPlayer>();
|
||||
foreach (var room in roomData.survivorRoom)
|
||||
else if (randomRoomData.killRoom.Contains(this._roomManager.currentRoom))
|
||||
{
|
||||
foreach (var roomPlayer in room.players)
|
||||
{
|
||||
Debug.Log($"幸存者:{roomPlayer.playerName}");
|
||||
players.Add(roomPlayer);
|
||||
}
|
||||
balanceNum = -1;
|
||||
}
|
||||
|
||||
float roleJinBei = 0;
|
||||
if (players.Count > 0)
|
||||
roleJinBei = jinBei / players.Count;
|
||||
|
||||
// Debug.Log($"胜利总金贝: is {jinBei}");
|
||||
// EventManager.Instance.FireNow(this, new JinBeiSettlementEventArgs(players, jinBei));
|
||||
CentsJinBei(players, roleJinBei);
|
||||
|
||||
var resultUI = Game.uiManager.GetUI<GameSceneResultUI>(UIType.GameSceneResultUI);
|
||||
if (players.Contains(this._playerManager.currentPlayer))
|
||||
resultUI.SetResult($"恭喜你躲避成功,胜利总金贝:{jinBei},你得到的金贝:{roleJinBei}", true);
|
||||
else
|
||||
resultUI.SetResult($"躲避失败,胜利总金贝:{jinBei},你得到的金贝:0", false);
|
||||
|
||||
//TODO:
|
||||
UniTask.Create(async () => { await this._roomManager.QuitAllRoomAsync(default); });
|
||||
|
||||
this.currentTime = 0;
|
||||
this.isInBalance = false;
|
||||
|
||||
await this.WaitShowResultAsync();
|
||||
{
|
||||
balanceNum = 1;
|
||||
}
|
||||
}
|
||||
|
||||
async UniTask WaitShowResultAsync()
|
||||
{
|
||||
var showUI = Game.uiManager.ShowUI(UIType.GameSceneResultUI);
|
||||
var resultUI = showUI as GameSceneResultUI;
|
||||
await resultUI.WaitShowAndCloseResultAsync(default);
|
||||
Game.uiManager.CloseLast();
|
||||
private int balanceNum = 0; //
|
||||
|
||||
async UniTask ShowBalanceUI(S2C_Balance s2CBalance)
|
||||
{
|
||||
string content = "";
|
||||
if (balanceNum == 0)
|
||||
{
|
||||
content = $"未进入房间参与投币!收益为 {s2CBalance.receive_money}";
|
||||
}
|
||||
else if (balanceNum < 0)
|
||||
{
|
||||
content = $"房间参与投币失败!收益为 {s2CBalance.receive_money}";
|
||||
}
|
||||
else if (balanceNum > 0)
|
||||
{
|
||||
content = $"房间参与投币胜利!收益为 {s2CBalance.receive_money}";
|
||||
}
|
||||
|
||||
this._playerManager.currentPlayer.MoneyRefresh(s2CBalance.money);
|
||||
var resultUI = Game.uiManager.GetUI<GameSceneResultUI>(UIType.GameSceneResultUI);
|
||||
resultUI.SetResult(content, this.balanceNum >= 0);
|
||||
|
||||
Game.uiManager.ShowUI(UIType.GameSceneResultUI);
|
||||
// await resultUI.WaitShowAndCloseResultAsync(default);
|
||||
// Game.uiManager.CloseLast();
|
||||
|
||||
this._roomManager.QuitAllRoomAsync(default).Forget();
|
||||
//
|
||||
}
|
||||
|
||||
void StartNewGame(S2C_StartNewGame s2CStartNewGame)
|
||||
{
|
||||
this.data.nowTime = s2CStartNewGame.data.nowTime;
|
||||
this.data.lunId = s2CStartNewGame.data.lunId;
|
||||
this.maxChooseRoomTime = lunSelectSeconds;
|
||||
this.maxAttackTime = lunAttackSeconds;
|
||||
this.isInBalance = false;
|
||||
Game.uiManager.HideUI(UIType.GameSceneResultUI);
|
||||
this._robotManager.EndOfTurnAuto();
|
||||
}
|
||||
|
||||
void CentsJinBei(List<IPlayer> players, float f)
|
||||
{
|
||||
foreach (var player in players)
|
||||
{
|
||||
EventManager.Instance.FireNow(this, new PlayerJinBeiChange_VictoryEventArgs(player, f));
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
public void PauseGame()
|
||||
{
|
||||
|
@ -251,6 +420,8 @@ namespace Game.Dinosaurs
|
|||
public void Dispose()
|
||||
{
|
||||
EventManager.Instance.Unsubscribe(InputObjectFinishEventArgs.EventId, InputObjectFinishEvent);
|
||||
EventManager.Instance.Unsubscribe(ClickBettingButton_ToDinosaursEventArgs.EventId, ClickBettingButton_ToDinosaursEvent);
|
||||
EventManager.Instance.Unsubscribe(NetworkMessageEventArgs.EventId, NetworkMessageEvent);
|
||||
|
||||
this._bfsManager.Dispose();
|
||||
this._mouseInputManager.Dispose();
|
||||
|
@ -267,6 +438,101 @@ namespace Game.Dinosaurs
|
|||
this._robotManager = null;
|
||||
}
|
||||
|
||||
private void NetworkMessageEvent(object sender, GameEventArgs e)
|
||||
{
|
||||
var args = e as NetworkMessageEventArgs;
|
||||
switch (args.passiveResponse.messageType)
|
||||
{
|
||||
case "klNewRoomList": // 消息类型-最新的所在房间位置
|
||||
var s2CRoomDataRefresh = CommonHelper.DeserializeObject<S2C_RoomDataRefresh>(args.data);
|
||||
// if (s2CRoomDataRefresh.data.lunId != this.lunId) return;
|
||||
|
||||
foreach (var roomInfo in s2CRoomDataRefresh.data.roomList)
|
||||
{
|
||||
this._roomManager.RoomMoneyRefresh((RoomType)roomInfo.roomId, roomInfo.moneys);
|
||||
}
|
||||
|
||||
break;
|
||||
case "klStartAttack": // 消息类型-开始恐龙袭击
|
||||
var s2CBossStartAttack = CommonHelper.DeserializeObject<S2C_BossStartAttack>(args.data);
|
||||
// if (s2CBossStartAttack.data.lunId != this.lunId) return;
|
||||
this.currentTime = this.maxAttackTime;
|
||||
this.data.state = S2C_EnterGameData.GameState.恐龙袭击中;
|
||||
this.isCanTimer = true;
|
||||
this.CreateBoss(s2CBossStartAttack);
|
||||
break;
|
||||
case "klNewLunStart": // 消息类型-新一轮游戏开始了
|
||||
var s2CStartNewGame = CommonHelper.DeserializeObject<S2C_StartNewGame>(args.data);
|
||||
this.data.state = S2C_EnterGameData.GameState.选择房间中;
|
||||
this.currentTime = this.maxChooseRoomTime;
|
||||
this.isCanTimer = true;
|
||||
StartNewGame(s2CStartNewGame);
|
||||
break;
|
||||
case "klGameOver": // 消息类型-游戏结束
|
||||
var s2CBalance = CommonHelper.DeserializeObject<S2C_Balance>(args.data);
|
||||
// if (s2CBalance.lunId != this.lunId) return;
|
||||
this.data.state = S2C_EnterGameData.GameState.已结束;
|
||||
this.isCanTimer = true;
|
||||
ShowBalanceUI(s2CBalance).Forget();
|
||||
break;
|
||||
case "klUserNewRoom": // 消息类型-该成员房间变动
|
||||
var s2CPlayerSwitchRoom = CommonHelper.DeserializeObject<S2C_PlayerSwitchRoom>(args.data);
|
||||
// if (s2CPlayerSwitchRoom.data.lunId != this.lunId) return;
|
||||
var player = this._playerManager.GetPlayer(s2CPlayerSwitchRoom.data.uId);
|
||||
this._roomManager.JoinRoomAsync((RoomType)s2CPlayerSwitchRoom.data.roomId, player, default).Forget();
|
||||
break;
|
||||
case "klUserAdd": // 消息类型-该成员房间变动
|
||||
var s2CNewPlayerJoin = CommonHelper.DeserializeObject<S2C_NewPlayerJoin>(args.data);
|
||||
// if (s2CNewPlayerJoin.data.lunId != this.lunId) return;
|
||||
|
||||
if (Game.currentPlayerData.uId == s2CNewPlayerJoin.data.uid)
|
||||
return;
|
||||
|
||||
var player1 = this._playerManager.CreatePlayer(s2CNewPlayerJoin.data.uid, s2CNewPlayerJoin.data.nickname, RoleType.Robot);
|
||||
this._roomManager.JoinRoomAsync(RoomType.出生点, player1, default).Forget();
|
||||
break;
|
||||
case "klUserExit": // 消息类型-成员主动退出游戏
|
||||
var s2COtherExitGame = CommonHelper.DeserializeObject<S2C_OtherActiveExitGame>(args.data);
|
||||
// if (s2CNewPlayerJoin.data.lunId != this.lunId) return;
|
||||
|
||||
this._playerManager.DeletePlayer(s2COtherExitGame.data.uid);
|
||||
break;
|
||||
case "loginOut": // 消息类型-成员被动退出游戏
|
||||
var s2COtherPassiveExitGame = CommonHelper.DeserializeObject<S2C_OtherPassiveExitGame>(args.data);
|
||||
// if (s2CNewPlayerJoin.data.lunId != this.lunId) return;
|
||||
|
||||
this._playerManager.DeletePlayer(s2COtherPassiveExitGame.data.uid);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
private void ClickBettingButton_ToDinosaursEvent(object sender, GameEventArgs e)
|
||||
{
|
||||
if (this._roomManager.currentRoom.roomType == RoomType.出生点)
|
||||
{
|
||||
Debug.Log("请先选择房间");
|
||||
return;
|
||||
}
|
||||
|
||||
var args = e as ClickBettingButton_ToDinosaursEventArgs;
|
||||
C2S_Betting c2SBetting = new C2S_Betting();
|
||||
c2SBetting.lunId = this.lunId;
|
||||
c2SBetting.money = args.jinBei;
|
||||
c2SBetting.roomId = this._roomManager.currentRoom.roomId;
|
||||
Game.socketManager.SendMessage(c2SBetting, Callback);
|
||||
|
||||
void Callback(string obj)
|
||||
{
|
||||
var s2CBetting = CommonHelper.DeserializeObject<S2C_Betting>(obj);
|
||||
if (s2CBetting.code == ResponseCode.Success)
|
||||
{
|
||||
args.callback?.Invoke(s2CBetting.code == ResponseCode.Success);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void InputObjectFinishEvent(object sender, GameEventArgs e)
|
||||
{
|
||||
if (this._playerManager.currentPlayer.isMoving)
|
||||
|
@ -293,7 +559,22 @@ namespace Game.Dinosaurs
|
|||
var roomInfo = inputData.go.GetComponent<RoomInfo>();
|
||||
|
||||
this._roomManager.SetCurrentRoom(roomInfo.roomType);
|
||||
UniTask.Create(async () => { await this._roomManager.JoinRoomAsync(roomInfo.roomType, this._playerManager.currentPlayer, default); });
|
||||
|
||||
var c2SJoinRoom = new C2S_JoinRoom();
|
||||
c2SJoinRoom.lunId = this.lunId;
|
||||
c2SJoinRoom.roomId = ((int)roomInfo.roomType).ToString();
|
||||
|
||||
Game.socketManager.SendMessage(c2SJoinRoom, JoinRoom);
|
||||
// UniTask.Create(async () => { await this._roomManager.JoinRoomAsync(roomInfo.roomType, this._playerManager.currentPlayer, default); });
|
||||
|
||||
void JoinRoom(string obj)
|
||||
{
|
||||
var s2CJoinRoom = CommonHelper.DeserializeObject<S2C_JoinRoom>(obj);
|
||||
if (s2CJoinRoom?.code == ResponseCode.Success)
|
||||
{
|
||||
this._roomManager.JoinRoomAsync(roomInfo.roomType, this._playerManager.currentPlayer, default).Forget();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -15,6 +15,7 @@ namespace Game.Player
|
|||
|
||||
public interface IPlayer
|
||||
{
|
||||
long uId { get; }
|
||||
string playerName { get; }
|
||||
RoleType roleType { get; }
|
||||
GameObject self { get; }
|
||||
|
@ -25,6 +26,7 @@ namespace Game.Player
|
|||
|
||||
UniTask<bool> WaitMoveRoomAsync(IRoom roo, CancellationToken token);
|
||||
void JumpToRoom(IRoom room);
|
||||
void MoneyRefresh(float money);
|
||||
void Init();
|
||||
void Dispose();
|
||||
}
|
||||
|
@ -40,6 +42,9 @@ namespace Game.Player
|
|||
|
||||
private IBFSManager _bfsManager;
|
||||
private RoleType _roleType;
|
||||
private long _uId;
|
||||
|
||||
public long uId => this._uId;
|
||||
|
||||
public string playerName => this._playerData.playerName;
|
||||
|
||||
|
@ -63,11 +68,12 @@ namespace Game.Player
|
|||
}
|
||||
}
|
||||
|
||||
public Player(string name, float jinBei, GameObject go, IBFSManager bfs, RoleType roleType)
|
||||
public Player(string name, long uId, GameObject go, IBFSManager bfs, RoleType roleType)
|
||||
{
|
||||
this._playerData = new PlayerData(name, jinBei, 100);
|
||||
this._playerData = new PlayerData(name, 100);
|
||||
this._bfsManager = bfs;
|
||||
this._roleType = roleType;
|
||||
this._uId = uId;
|
||||
|
||||
// view
|
||||
this._self = go;
|
||||
|
@ -109,6 +115,12 @@ namespace Game.Player
|
|||
playerInfo.JumpTo(endPos);
|
||||
}
|
||||
|
||||
public void MoneyRefresh(float money)
|
||||
{
|
||||
this._playerData.RefreshMoney(money);
|
||||
EventManager.Instance.FireNow(this, new PlayerJinBeiChange_ToMainUIEventArgs());
|
||||
}
|
||||
|
||||
private async UniTask<bool> MoveAsync(List<WayPoint> wayPoint, CancellationToken token)
|
||||
{
|
||||
if (this._isMoving) return false;
|
||||
|
@ -125,14 +137,14 @@ namespace Game.Player
|
|||
{
|
||||
EventManager.Instance.Subscribe(PlayerJinBeiChange_ToPlayerEventArgs.EventId, PlayerJinbeiChangeEvent);
|
||||
EventManager.Instance.Subscribe(PlayerJinBeiChange_VictoryEventArgs.EventId, PlayerJinBeiChange_VictoryEvent);
|
||||
EventManager.Instance.Subscribe(ReturnPlayerJinBeiEventArgs.EventId, ReturnPlayerJinBeiEvent);
|
||||
// EventManager.Instance.Subscribe(ReturnPlayerJinBeiEventArgs.EventId, ReturnPlayerJinBeiEvent);
|
||||
}
|
||||
|
||||
public virtual void Dispose()
|
||||
{
|
||||
EventManager.Instance.Unsubscribe(PlayerJinBeiChange_ToPlayerEventArgs.EventId, PlayerJinbeiChangeEvent);
|
||||
EventManager.Instance.Unsubscribe(PlayerJinBeiChange_VictoryEventArgs.EventId, PlayerJinBeiChange_VictoryEvent);
|
||||
EventManager.Instance.Unsubscribe(ReturnPlayerJinBeiEventArgs.EventId, ReturnPlayerJinBeiEvent);
|
||||
// EventManager.Instance.Unsubscribe(ReturnPlayerJinBeiEventArgs.EventId, ReturnPlayerJinBeiEvent);
|
||||
|
||||
if (this._room != null)
|
||||
this._room.Quit(this);
|
||||
|
@ -145,15 +157,15 @@ namespace Game.Player
|
|||
this._self = null;
|
||||
}
|
||||
|
||||
private void ReturnPlayerJinBeiEvent(object sender, GameEventArgs e)
|
||||
{
|
||||
var args = e as ReturnPlayerJinBeiEventArgs;
|
||||
if (args != null && args.player == this)
|
||||
{
|
||||
this._playerData.ReturnJinBei(args.jinBei);
|
||||
EventManager.Instance.FireNow(this, new PlayerJinBeiChange_ToMainUIEventArgs(this));
|
||||
}
|
||||
}
|
||||
// private void ReturnPlayerJinBeiEvent(object sender, GameEventArgs e)
|
||||
// {
|
||||
// var args = e as ReturnPlayerJinBeiEventArgs;
|
||||
// if (args != null && args.player == this)
|
||||
// {
|
||||
// this._playerData.ReturnJinBei(args.jinBei);
|
||||
// EventManager.Instance.FireNow(this, new PlayerJinBeiChange_ToMainUIEventArgs(this));
|
||||
// }
|
||||
// }
|
||||
|
||||
private void PlayerJinBeiChange_VictoryEvent(object sender, GameEventArgs e)
|
||||
{
|
||||
|
|
|
@ -7,16 +7,15 @@
|
|||
public float jinbei;
|
||||
public float hp;
|
||||
|
||||
public PlayerData(string playerName, float jinbei, float hp)
|
||||
public PlayerData(string playerName, float hp)
|
||||
{
|
||||
this.playerName = playerName;
|
||||
this.jinbei = jinbei;
|
||||
this.hp = hp;
|
||||
}
|
||||
|
||||
public void ReturnJinBei(float f)
|
||||
public void RefreshMoney(float f)
|
||||
{
|
||||
this.jinbei += f;
|
||||
this.jinbei = f;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -22,6 +22,7 @@ namespace Game.Player
|
|||
private void Awake()
|
||||
{
|
||||
_animator = this.GetComponent<SpineAnimator>();
|
||||
_animator.PlayAni("idle", true);
|
||||
}
|
||||
|
||||
public void SetPlayer(Player player)
|
||||
|
@ -66,6 +67,7 @@ namespace Game.Player
|
|||
public void JumpTo(Vector2 endPos)
|
||||
{
|
||||
transform.position = endPos;
|
||||
_animator.PlayAni("idle", true);
|
||||
}
|
||||
|
||||
#region Add Test
|
||||
|
|
|
@ -7,7 +7,7 @@ namespace Game.Player
|
|||
{
|
||||
public class PlayerManager : ManagerBase, IPlayerManager
|
||||
{
|
||||
protected Dictionary<string, IPlayer> _players;
|
||||
protected Dictionary<long, IPlayer> _players;
|
||||
private IPlayer _currentPlayer;
|
||||
private string assetName = AssetConstPath.Assets_GameRes_Prefabs_Role_player1;
|
||||
|
||||
|
@ -21,7 +21,7 @@ namespace Game.Player
|
|||
|
||||
public PlayerManager(IBFSManager bfsManager)
|
||||
{
|
||||
_players = new Dictionary<string, IPlayer>();
|
||||
_players = new Dictionary<long, IPlayer>();
|
||||
this._currentPlayer = null;
|
||||
this._bfsManager = bfsManager;
|
||||
}
|
||||
|
@ -31,27 +31,29 @@ namespace Game.Player
|
|||
this._currentPlayer ??= player;
|
||||
}
|
||||
|
||||
public IPlayer CreatePlayer(string playerName, float jinbei)
|
||||
public IPlayer CreatePlayer(long uid, string playerName, RoleType roleType)
|
||||
{
|
||||
var gameObject = Game.resourceManager.LoadGameObjectSync(assetName);
|
||||
IPlayer player = new Player(playerName, jinbei, gameObject, this._bfsManager, RoleType.Player);
|
||||
IPlayer player = new Player(playerName, uid, gameObject, this._bfsManager, roleType);
|
||||
gameObject.name = playerName;
|
||||
gameObject.transform.position = new Vector3(-9.6f, -10.3f);
|
||||
|
||||
this._players.Add(playerName, player);
|
||||
this._players.Add(uid, player);
|
||||
player.Init();
|
||||
return player;
|
||||
}
|
||||
|
||||
public IPlayer GetPlayer(string playerName)
|
||||
public IPlayer GetPlayer(long uId)
|
||||
{
|
||||
return this._players.GetValueOrDefault(playerName);
|
||||
return this._players.GetValueOrDefault(uId);
|
||||
}
|
||||
|
||||
public void DeletePlayer(string playerName)
|
||||
public void DeletePlayer(long uId)
|
||||
{
|
||||
if (this._players.TryGetValue(playerName, out var player))
|
||||
if (this._players.TryGetValue(uId, out var player))
|
||||
{
|
||||
player.Dispose();
|
||||
this._players.Remove(playerName);
|
||||
this._players.Remove(uId);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -78,13 +80,13 @@ namespace Game.Player
|
|||
|
||||
void SetCurrentPlayer(IPlayer player);
|
||||
|
||||
IPlayer CreatePlayer(string playerName, float jinbei);
|
||||
IPlayer CreatePlayer(long uid, string playerName, RoleType roleType);
|
||||
|
||||
// IPlayer InsPlayer(string assetName);
|
||||
|
||||
IPlayer GetPlayer(string playerName);
|
||||
IPlayer GetPlayer(long uId);
|
||||
|
||||
void DeletePlayer(string playerName);
|
||||
void DeletePlayer(long uId);
|
||||
void DeleteAllPlayer();
|
||||
|
||||
// void DeleteInsPlayer(IPlayer player);
|
||||
|
|
|
@ -5,7 +5,7 @@ namespace Game.Player
|
|||
{
|
||||
internal class Robot : Player
|
||||
{
|
||||
public Robot(string name, float jinBei, GameObject go, IBFSManager bfs, RoleType roleType) : base(name, jinBei, go, bfs, roleType)
|
||||
public Robot(string name, long uId, GameObject go, IBFSManager bfs, RoleType roleType) : base(name, uId, go, bfs, roleType)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
|
|
@ -11,7 +11,7 @@ namespace Game.Player
|
|||
{
|
||||
public interface IRobotManager
|
||||
{
|
||||
void CreateRobot();
|
||||
IPlayer CreateRobot(long uId, string robotName);
|
||||
void EndOfTurnAuto();
|
||||
void DeleteAllRobot();
|
||||
}
|
||||
|
@ -50,10 +50,10 @@ namespace Game.Player
|
|||
this.isBossMoveing = args.isMoveing;
|
||||
}
|
||||
|
||||
private IPlayer CreatePlayer(string playerName, float jinbei)
|
||||
private IPlayer CreatePlayer(long uId, string playerName)
|
||||
{
|
||||
var gameObject = Game.resourceManager.LoadGameObjectSync(assetName);
|
||||
IPlayer player = new Player(playerName, jinbei, gameObject, this._bfsManager, RoleType.Robot);
|
||||
IPlayer player = new Player(playerName, uId, gameObject, this._bfsManager, RoleType.Robot);
|
||||
player.self.transform.position = new Vector3(-9.6f, -10.3f);
|
||||
|
||||
this._players.Add(playerName, player);
|
||||
|
@ -61,29 +61,26 @@ namespace Game.Player
|
|||
return player;
|
||||
}
|
||||
|
||||
public void CreateRobot()
|
||||
public IPlayer CreateRobot(long uId, string robotName)
|
||||
{
|
||||
if (this.isBossMoveing) return;
|
||||
// if (this.isBossMoveing) return ;
|
||||
|
||||
Guid guid = Guid.NewGuid();
|
||||
string robotName = guid.ToString();
|
||||
float robotJinBei = 100;
|
||||
|
||||
var player = this.CreatePlayer(robotName, robotJinBei);
|
||||
var room = this._roomManager.GetRandomRoom();
|
||||
|
||||
UniTask.Create(async () =>
|
||||
{
|
||||
await this._roomManager.JoinRoomAsync(room.roomType, player, CancellationToken.None);
|
||||
|
||||
// 下注
|
||||
float jinBei = Random.Range(0, 10);
|
||||
EventManager.Instance.FireNow(this, new PlayerJinBeiChange_ToPlayerEventArgs(player, jinBei, (isTrue) =>
|
||||
{
|
||||
if (isTrue)
|
||||
JinBeiChangeCallback(room, player, jinBei);
|
||||
}));
|
||||
});
|
||||
var player = this.CreatePlayer(uId, robotName);
|
||||
return player;
|
||||
// var room = this._roomManager.GetRandomRoom();
|
||||
//
|
||||
// UniTask.Create(async () =>
|
||||
// {
|
||||
// await this._roomManager.JoinRoomAsync(room.roomType, player, CancellationToken.None);
|
||||
//
|
||||
// // 下注
|
||||
// float jinBei = Random.Range(0, 10);
|
||||
// EventManager.Instance.FireNow(this, new PlayerJinBeiChange_ToPlayerEventArgs(player, jinBei, (isTrue) =>
|
||||
// {
|
||||
// if (isTrue)
|
||||
// JinBeiChangeCallback(room, player, jinBei);
|
||||
// }));
|
||||
// });
|
||||
}
|
||||
|
||||
public void EndOfTurnAuto()
|
||||
|
|
|
@ -10,14 +10,15 @@ namespace Game.Room
|
|||
public interface IRoomManager
|
||||
{
|
||||
IRoom currentRoom { get; }
|
||||
IRoom CreateRoom(RoomType roomType, string location);
|
||||
IRoom CreateRoom(RoomType roomType, string location, float jinBei);
|
||||
void SetCurrentRoom(RoomType roomType);
|
||||
IRoom GetRoom(RoomType roomType);
|
||||
IRoom GetRandomRoom();
|
||||
RandomRoomData GetAllRandomRoom();
|
||||
RandomRoomData GetAttackRoom(int[] attackRoom);
|
||||
UniTask<bool> JoinRoomAsync(RoomType roomType, IPlayer player, CancellationToken token);
|
||||
bool QuitRoom(RoomType roomType, IPlayer player);
|
||||
UniTask QuitAllRoomAsync(CancellationToken token);
|
||||
void RoomMoneyRefresh(RoomType roomType, float money);
|
||||
void DeleteRoom(RoomType roomType);
|
||||
void DeleteAllRoom();
|
||||
}
|
||||
|
@ -34,29 +35,29 @@ namespace Game.Room
|
|||
protected override void OnInit()
|
||||
{
|
||||
base.OnInit();
|
||||
EventManager.Instance.Subscribe(RoomJinBeiChangeEventArgs.EventId, RoomJinBeiChangeEvent);
|
||||
// EventManager.Instance.Subscribe(RoomJinBeiChangeEventArgs.EventId, RoomJinBeiChangeEvent);
|
||||
}
|
||||
|
||||
protected override void OnDispose()
|
||||
{
|
||||
base.OnDispose();
|
||||
EventManager.Instance.Unsubscribe(RoomJinBeiChangeEventArgs.EventId, RoomJinBeiChangeEvent);
|
||||
// EventManager.Instance.Unsubscribe(RoomJinBeiChangeEventArgs.EventId, RoomJinBeiChangeEvent);
|
||||
this.DeleteAllRoom();
|
||||
}
|
||||
|
||||
private void RoomJinBeiChangeEvent(object sender, GameEventArgs e)
|
||||
{
|
||||
var args = e as RoomJinBeiChangeEventArgs;
|
||||
args.room.InvestmentJinBei(args.player, args.jinBei);
|
||||
}
|
||||
// private void RoomJinBeiChangeEvent(object sender, GameEventArgs e)
|
||||
// {
|
||||
// var args = e as RoomJinBeiChangeEventArgs;
|
||||
// args.room.InvestmentJinBei(args.player, args.jinBei);
|
||||
// }
|
||||
|
||||
public IRoom CreateRoom(RoomType roomType, string location)
|
||||
public IRoom CreateRoom(RoomType roomType, string location, float jinBei)
|
||||
{
|
||||
if (this._rooms.TryGetValue(roomType, out var room))
|
||||
return room;
|
||||
|
||||
var gameObject = Game.resourceManager.LoadGameObjectSync(location);
|
||||
room = new Room(roomType, gameObject);
|
||||
room = new Room(roomType, gameObject, jinBei);
|
||||
|
||||
this._rooms.Add(roomType, room);
|
||||
|
||||
|
@ -83,7 +84,7 @@ namespace Game.Room
|
|||
return this._rooms[(RoomType)index];
|
||||
}
|
||||
|
||||
public RandomRoomData GetAllRandomRoom()
|
||||
public RandomRoomData GetAttackRoom(int[] attackRoom)
|
||||
{
|
||||
if (this.tmp.Count <= 0 || this.tmp.ContainsKey(RoomType.出生点))
|
||||
{
|
||||
|
@ -92,23 +93,29 @@ namespace Game.Room
|
|||
}
|
||||
|
||||
// kill
|
||||
var killRoom = this.tmp.Values.ToList();
|
||||
ShuffleAndRemoveRooms(killRoom);
|
||||
// var killRoom = this.tmp.Values.ToList();
|
||||
// ShuffleAndRemoveRooms(killRoom);
|
||||
|
||||
List<IRoom> killRoom = new List<IRoom>();
|
||||
foreach (var i in attackRoom)
|
||||
{
|
||||
killRoom.Add(GetRoom((RoomType)i));
|
||||
}
|
||||
|
||||
//
|
||||
var survivorRoom = this.tmp.Values.ToList().Except(killRoom).ToList();
|
||||
|
||||
// 标记一下
|
||||
foreach (var room in killRoom)
|
||||
{
|
||||
room.SetIsCanReturnJinBei(false);
|
||||
}
|
||||
|
||||
// 标记一下
|
||||
foreach (var room in survivorRoom)
|
||||
{
|
||||
room.SetIsCanReturnJinBei(true);
|
||||
}
|
||||
// // 标记一下
|
||||
// foreach (var room in killRoom)
|
||||
// {
|
||||
// room.SetIsCanReturnJinBei(false);
|
||||
// }
|
||||
//
|
||||
// // 标记一下
|
||||
// foreach (var room in survivorRoom)
|
||||
// {
|
||||
// room.SetIsCanReturnJinBei(true);
|
||||
// }
|
||||
|
||||
RandomRoomData roomData = new RandomRoomData();
|
||||
roomData.killRoom = killRoom;
|
||||
|
@ -191,6 +198,12 @@ namespace Game.Room
|
|||
// Debug.Log("全部返回了出生点");
|
||||
}
|
||||
|
||||
public void RoomMoneyRefresh(RoomType roomType, float money)
|
||||
{
|
||||
if (this._rooms.TryGetValue(roomType, out var room))
|
||||
room.RefreshMoney(money);
|
||||
}
|
||||
|
||||
public void DeleteRoom(RoomType roomType)
|
||||
{
|
||||
if (this._rooms.TryGetValue(roomType, out var room))
|
||||
|
|
|
@ -14,17 +14,16 @@ namespace Game.Room
|
|||
RoomInfo roomInfo { get; }
|
||||
IReadOnlyList<IPlayer> players { get; }
|
||||
RoomType roomType { get; }
|
||||
string roomId { get; }
|
||||
|
||||
UniTask<bool> JoinAsync(IPlayer player, CancellationToken token);
|
||||
UniTask<bool> Quit(IPlayer player);
|
||||
|
||||
void SetIsCanReturnJinBei(bool isCan);
|
||||
|
||||
List<IPlayer> QuitAndClearAll();
|
||||
|
||||
void Dispose();
|
||||
|
||||
bool InvestmentJinBei(IPlayer player, float jinbei);
|
||||
bool RefreshMoney(float jinBei);
|
||||
}
|
||||
|
||||
[System.Serializable]
|
||||
|
@ -34,9 +33,9 @@ namespace Game.Room
|
|||
private RoomInfo _roomInfo;
|
||||
private RoomData _roomData;
|
||||
private string _roomName;
|
||||
private bool _isCanReturnJinBei;
|
||||
|
||||
public RoomType roomType => this._roomData.roomType;
|
||||
public string roomId => ((int)this._roomData.roomType).ToString();
|
||||
|
||||
public string roomName => this._roomName;
|
||||
|
||||
|
@ -46,9 +45,9 @@ namespace Game.Room
|
|||
|
||||
public IReadOnlyList<IPlayer> players => this._roomData.players;
|
||||
|
||||
public Room(RoomType roomType, GameObject roomGo)
|
||||
public Room(RoomType roomType, GameObject roomGo, float jinBei)
|
||||
{
|
||||
this._roomData = new RoomData(roomType);
|
||||
this._roomData = new RoomData(roomType, jinBei);
|
||||
_roomName = roomType.ToString();
|
||||
|
||||
// view
|
||||
|
@ -86,45 +85,22 @@ namespace Game.Room
|
|||
return false;
|
||||
// Debug.Log($"{player.playerName} quit {roomType} !!");
|
||||
|
||||
var f = this._roomData.RemovePlayer(player);
|
||||
EventManager.Instance.FireNow(this, new ReturnPlayerJinBeiEventArgs(player, f));
|
||||
this._roomData.RemovePlayer(player);
|
||||
|
||||
await UniTask.Yield();
|
||||
return true;
|
||||
}
|
||||
|
||||
public void SetIsCanReturnJinBei(bool isCan)
|
||||
{
|
||||
this._isCanReturnJinBei = isCan;
|
||||
}
|
||||
|
||||
public List<IPlayer> QuitAndClearAll()
|
||||
{
|
||||
if (this._isCanReturnJinBei)
|
||||
{
|
||||
// 归还金贝
|
||||
var dictionary = this._roomData.ReturnPlayerAndJinBei();
|
||||
foreach (var player in dictionary.Keys)
|
||||
{
|
||||
// Debug.Log($"return player {player.playerName} jinBei : {dictionary[player]}");
|
||||
EventManager.Instance.FireNow(this, new ReturnPlayerJinBeiEventArgs(player, dictionary[player]));
|
||||
}
|
||||
}
|
||||
|
||||
var list = new List<IPlayer>(_roomData.players);
|
||||
this._roomData.Reset();
|
||||
return list;
|
||||
}
|
||||
|
||||
public bool InvestmentJinBei(IPlayer player, float jinBei)
|
||||
public bool RefreshMoney(float jinBei)
|
||||
{
|
||||
if (!this.players.Contains(player))
|
||||
{
|
||||
// Debug.LogWarning($"{roomType} dont have {player.playerName}");
|
||||
return false;
|
||||
}
|
||||
|
||||
this._roomData.AddJinBei(player, jinBei);
|
||||
this._roomData.RefreshMoney(jinBei);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Game.Player;
|
||||
using Sirenix.OdinInspector;
|
||||
|
||||
namespace Game.Room
|
||||
{
|
||||
|
@ -10,67 +8,49 @@ namespace Game.Room
|
|||
public class RoomData
|
||||
{
|
||||
private float jinBeiCountCache;
|
||||
|
||||
public RoomType roomType { get; }
|
||||
|
||||
private Dictionary<IPlayer, float> playersDic;
|
||||
private List<IPlayer> _players;
|
||||
|
||||
public float jinBeiCount => this.jinBeiCountCache;
|
||||
|
||||
public IReadOnlyList<IPlayer> players => this.playersDic.Keys.ToList();
|
||||
public IReadOnlyList<IPlayer> players => _players;
|
||||
public RoomType roomType { get; }
|
||||
|
||||
public Action<float> jinBeiCallback;
|
||||
|
||||
public RoomData(RoomType roomType) // , Vector2 down, Vector2 up
|
||||
public RoomData(RoomType roomType, float jinBei) // , Vector2 down, Vector2 up
|
||||
{
|
||||
this.jinBeiCountCache = jinBei;
|
||||
this.roomType = roomType;
|
||||
this.playersDic = new Dictionary<IPlayer, float>();
|
||||
_players = new List<IPlayer>();
|
||||
}
|
||||
|
||||
public void AddPlayer(IPlayer player)
|
||||
{
|
||||
this.playersDic.Add(player, 0);
|
||||
this._players.Add(player);
|
||||
}
|
||||
|
||||
public float RemovePlayer(IPlayer player)
|
||||
public void RemovePlayer(IPlayer player)
|
||||
{
|
||||
if (this.playersDic.TryGetValue(player, out var value))
|
||||
{
|
||||
UpdateJinBei(-value);
|
||||
this.playersDic.Remove(player);
|
||||
}
|
||||
|
||||
return value;
|
||||
if (this._players.Contains(player))
|
||||
_players.Remove(player);
|
||||
}
|
||||
|
||||
public bool AddJinBei(IPlayer player, float jinBei)
|
||||
public bool RefreshMoney(float jinBei)
|
||||
{
|
||||
if (this.playersDic.TryGetValue(player, out var value))
|
||||
{
|
||||
value += jinBei;
|
||||
this.playersDic[player] = value;
|
||||
UpdateJinBei(jinBei);
|
||||
return true;
|
||||
}
|
||||
|
||||
jinBeiCountCache = jinBei;
|
||||
UpdateJinBei();
|
||||
return false;
|
||||
}
|
||||
|
||||
public Dictionary<IPlayer, float> ReturnPlayerAndJinBei()
|
||||
{
|
||||
return this.playersDic;
|
||||
}
|
||||
|
||||
public void Reset()
|
||||
{
|
||||
this.jinBeiCountCache = 0;
|
||||
UpdateJinBei(0);
|
||||
this.playersDic.Clear();
|
||||
UpdateJinBei();
|
||||
this._players.Clear();
|
||||
}
|
||||
|
||||
void UpdateJinBei(float f)
|
||||
void UpdateJinBei()
|
||||
{
|
||||
this.jinBeiCountCache += f;
|
||||
this.jinBeiCallback?.Invoke(this.jinBeiCountCache);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,19 @@
|
|||
using System;
|
||||
|
||||
namespace Game
|
||||
{
|
||||
public class ClickBettingButton_ToDinosaursEventArgs : GameEventArgs
|
||||
{
|
||||
public static readonly int EventId = typeof(ClickBettingButton_ToDinosaursEventArgs).GetHashCode();
|
||||
public override int Id => EventId;
|
||||
|
||||
public float jinBei { get; }
|
||||
public Action<bool> callback { get; }
|
||||
|
||||
public ClickBettingButton_ToDinosaursEventArgs(float jinBei, Action<bool> callback)
|
||||
{
|
||||
this.jinBei = jinBei;
|
||||
this.callback = callback;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,3 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 4ebd6d50dd7b43e6995c9f26ea43885b
|
||||
timeCreated: 1714699095
|
|
@ -0,0 +1,12 @@
|
|||
using Game.Data;
|
||||
|
||||
namespace Game
|
||||
{
|
||||
public class NetworkMessageEventArgs : GameEventArgs
|
||||
{
|
||||
public static readonly int EventId = typeof(NetworkMessageEventArgs).GetHashCode();
|
||||
public override int Id => EventId;
|
||||
public string data;
|
||||
public PassiveResponse passiveResponse;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,3 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 651c701d8a0745188666f1a2d86a2510
|
||||
timeCreated: 1714470230
|
|
@ -6,12 +6,5 @@ namespace Game
|
|||
{
|
||||
public static readonly int EventId = typeof(PlayerJinBeiChange_ToMainUIEventArgs).GetHashCode();
|
||||
public override int Id => EventId;
|
||||
|
||||
public IPlayer player { get; }
|
||||
|
||||
public PlayerJinBeiChange_ToMainUIEventArgs(IPlayer player)
|
||||
{
|
||||
this.player = player;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -14,17 +14,11 @@ namespace Game
|
|||
{
|
||||
public class GlobalPlayerData
|
||||
{
|
||||
public string name;
|
||||
public long id;
|
||||
public float jinBei;
|
||||
public long uId;
|
||||
public string nickname;
|
||||
public string avatar;
|
||||
public float money;
|
||||
// ....
|
||||
|
||||
public GlobalPlayerData(string name, long id, float jinBei)
|
||||
{
|
||||
this.name = name;
|
||||
this.id = id;
|
||||
this.jinBei = jinBei;
|
||||
}
|
||||
}
|
||||
|
||||
public class Game : MonoBehaviour
|
||||
|
@ -36,6 +30,7 @@ namespace Game
|
|||
private ProcedureManager _procedureManager;
|
||||
private SocketManager _socketManager;
|
||||
private HttpManager _httpManager;
|
||||
private SocketEventManager _socketEventManager;
|
||||
|
||||
[SerializeField] private LoadType _loadType1 = LoadType.Editor;
|
||||
[SerializeField] private float time;
|
||||
|
@ -46,6 +41,8 @@ namespace Game
|
|||
public static IUIManager uiManager => _game._uiManager;
|
||||
public static ISocketManager socketManager => _game._socketManager;
|
||||
public static IHttpManager httpManager => _game._httpManager;
|
||||
public static ISocketEventManager socketEventManager => _game._socketEventManager;
|
||||
|
||||
public static GlobalPlayerData currentPlayerData;
|
||||
|
||||
private void Awake()
|
||||
|
@ -59,12 +56,14 @@ namespace Game
|
|||
this._procedureManager = new ProcedureManager();
|
||||
this._socketManager = new SocketManager();
|
||||
this._httpManager = new HttpManager();
|
||||
this._socketEventManager = new SocketEventManager(socketManager);
|
||||
|
||||
this._resourceManager.Init();
|
||||
this._uiManager.Init();
|
||||
this._procedureManager.Init();
|
||||
this._socketManager.Init();
|
||||
this._httpManager.Init();
|
||||
this._socketEventManager.Init();
|
||||
}
|
||||
|
||||
private void Start()
|
||||
|
@ -116,6 +115,7 @@ namespace Game
|
|||
this._procedureManager.Update(time);
|
||||
this._socketManager.Update(this.time);
|
||||
this._httpManager.Update(this.time);
|
||||
this._socketEventManager.Update(this.time);
|
||||
}
|
||||
|
||||
private void OnDestroy()
|
||||
|
@ -125,6 +125,7 @@ namespace Game
|
|||
this._procedureManager.Dispose();
|
||||
this._socketManager.Dispose();
|
||||
this._httpManager.Dispose();
|
||||
this._socketEventManager.Dispose();
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,5 +1,7 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Game.Data;
|
||||
using Newtonsoft.Json;
|
||||
using UnityEngine;
|
||||
using Object = UnityEngine.Object;
|
||||
|
||||
|
@ -70,5 +72,16 @@ namespace Game
|
|||
var globalTipsUI = ui as GlobalTipsUI;
|
||||
globalTipsUI.SetContent(content, btnSure, sure, btnClose);
|
||||
}
|
||||
|
||||
// public static void OpenAndSetTips(Request request, Action<Response> callback = null)
|
||||
// {
|
||||
// Game.socketManager.SendMessage(request, callback);
|
||||
// }
|
||||
|
||||
public static T DeserializeObject<T>(string data)
|
||||
{
|
||||
T deserializeObject = JsonConvert.DeserializeObject<T>(data);
|
||||
return deserializeObject;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,35 @@
|
|||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using UnityEngine;
|
||||
using Random = System.Random;
|
||||
|
||||
namespace Game
|
||||
{
|
||||
public class GenKey
|
||||
{
|
||||
private static List<string> _list = new List<string>();
|
||||
|
||||
public static string GenerateRandomString(int length = 10)
|
||||
{
|
||||
const string chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
|
||||
Random random = new Random();
|
||||
|
||||
StringBuilder stringBuilder = new StringBuilder(length);
|
||||
for (int i = 0; i < length; i++)
|
||||
{
|
||||
stringBuilder.Append(chars[random.Next(chars.Length)]);
|
||||
}
|
||||
|
||||
var randomString = stringBuilder.ToString();
|
||||
if (_list.Contains(randomString))
|
||||
{
|
||||
return GenerateRandomString();
|
||||
}
|
||||
|
||||
_list.Add(randomString);
|
||||
|
||||
Debug.Log(randomString);
|
||||
return randomString;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,3 @@
|
|||
fileFormatVersion: 2
|
||||
guid: bedda08a42e74869af3bff7ecb47a96b
|
||||
timeCreated: 1714729400
|
|
@ -0,0 +1,3 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 7b945718b11148ea91448db7e4662072
|
||||
timeCreated: 1714440622
|
|
@ -0,0 +1,89 @@
|
|||
using System;
|
||||
using Cysharp.Threading.Tasks;
|
||||
using Game.Data;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Game.HH
|
||||
{
|
||||
[AttributeUsage(AttributeTargets.Class)]
|
||||
class EventTypeAttribute : Attribute
|
||||
{
|
||||
public AEventType @eventType { get; set; }
|
||||
|
||||
public EventTypeAttribute(AEventType eventType)
|
||||
{
|
||||
this.eventType = eventType;
|
||||
}
|
||||
}
|
||||
|
||||
public enum AEventType
|
||||
{
|
||||
Login,
|
||||
}
|
||||
|
||||
[EventType(AEventType.Login)]
|
||||
public class LoginEvent : AEvent<C2S_Login, S2C_Login>
|
||||
{
|
||||
protected override async UniTask Run(ISocketManager m, C2S_Login request, Action<S2C_Login> callback)
|
||||
{
|
||||
// m.SendMessageAsync(request, (response =>
|
||||
// {
|
||||
// var s2CLogin = (S2C_Login)response;
|
||||
// callback?.Invoke(s2CLogin);
|
||||
// LoginFinish(s2CLogin);
|
||||
// }));
|
||||
await UniTask.Yield();
|
||||
}
|
||||
|
||||
private void LoginFinish(S2C_Login response)
|
||||
{
|
||||
switch ((ResponseCode)response.code)
|
||||
{
|
||||
case ResponseCode.Success:
|
||||
if (this.m.IsOpen)
|
||||
Debug.Log("断线重连,登录成功");
|
||||
else
|
||||
Debug.Log("登录成功");
|
||||
break;
|
||||
case ResponseCode.Error:
|
||||
if (this.m.IsOpen)
|
||||
Debug.Log("断线重连,登录失败");
|
||||
else
|
||||
Debug.Log("登录失败");
|
||||
break;
|
||||
default:
|
||||
throw new ArgumentOutOfRangeException();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public interface IEvent
|
||||
{
|
||||
Type Type { get; }
|
||||
}
|
||||
|
||||
public abstract class AEvent<C, S> : IEvent //where C : Request where S : Response
|
||||
{
|
||||
public Type Type
|
||||
{
|
||||
get { return typeof(S); }
|
||||
}
|
||||
|
||||
protected ISocketManager m;
|
||||
|
||||
protected abstract UniTask Run(ISocketManager m, C request, Action<S> callback);
|
||||
|
||||
public async UniTask Handle(ISocketManager m, C c, Action<S> callback)
|
||||
{
|
||||
try
|
||||
{
|
||||
this.m = m;
|
||||
await Run(m, c, callback);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Debug.LogError(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,3 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 2cb86f8077c7491cbfcc4ae9fe6c5af8
|
||||
timeCreated: 1714440643
|
|
@ -33,7 +33,6 @@ namespace Game
|
|||
if (data.code == "0")
|
||||
{
|
||||
Game.socketManager.SetHttpToken(data.data.ToString());
|
||||
Game.socketManager.ConnectAsync();
|
||||
responseData = data;
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -2,11 +2,12 @@ namespace Game
|
|||
{
|
||||
public static class NetworkConst
|
||||
{
|
||||
public const string loginUrl = "http://192.168.1.129:8787/api/user/login";
|
||||
public const string loginUrl = @"http://webman.gzsnet.com/api/user/login";
|
||||
|
||||
private const string serverIP = "192.168.1.129";
|
||||
// private const string serverIP = "192.168.1.129";
|
||||
private const string serverIP = "1.14.121.81";
|
||||
|
||||
private const int serverPort = 7272;
|
||||
private const int serverPort = 12720;
|
||||
|
||||
public static string socketUrl => $"ws://{serverIP}:{serverPort}";
|
||||
}
|
||||
|
|
|
@ -0,0 +1,60 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Cysharp.Threading.Tasks;
|
||||
using Game.Data;
|
||||
using Game.HH;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Game
|
||||
{
|
||||
public interface ISocketEventManager
|
||||
{
|
||||
}
|
||||
|
||||
public class SocketEventManager : ManagerBase, ISocketEventManager
|
||||
{
|
||||
private ISocketManager _socketManager;
|
||||
private Dictionary<AEventType, Type> _types = new Dictionary<AEventType, Type>();
|
||||
private Dictionary<AEventType, AEvent<Request, Response>> _dictionary = new Dictionary<AEventType, AEvent<Request, Response>>();
|
||||
|
||||
public SocketEventManager(ISocketManager socketManager)
|
||||
{
|
||||
this._socketManager = socketManager;
|
||||
}
|
||||
|
||||
protected override void OnInit()
|
||||
{
|
||||
base.OnInit();
|
||||
var types = new List<(Type, EventTypeAttribute)>();
|
||||
AssemblyManager.GetTypesInhertType<EventTypeAttribute>(typeof(AEvent<Request, Response>), types);
|
||||
foreach (var (type, uiTypeAttribute) in types)
|
||||
{
|
||||
this._types.Add(uiTypeAttribute.eventType, type);
|
||||
Debug.Log("eventType Add : " + uiTypeAttribute.eventType);
|
||||
}
|
||||
|
||||
// Create(AEventType.Login);
|
||||
}
|
||||
|
||||
void Create(AEventType eventType)
|
||||
{
|
||||
if (!this._types.TryGetValue(eventType, out var type))
|
||||
{
|
||||
throw new InvalidOperationException();
|
||||
}
|
||||
|
||||
if (Activator.CreateInstance(type, false) is not AEvent<Request, Response> aEvent)
|
||||
throw new NullReferenceException();
|
||||
|
||||
this._dictionary.Add(eventType, aEvent);
|
||||
}
|
||||
|
||||
public void Fire(AEventType eventType, Request request, Action<Response> callback = null)
|
||||
{
|
||||
if (this._dictionary.TryGetValue(eventType, out var aEvent))
|
||||
{
|
||||
aEvent.Handle(this._socketManager, request, callback).Forget();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,3 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 648d9a07cd1c4441b6a8d325d9ef292a
|
||||
timeCreated: 1714455734
|
|
@ -1,8 +1,11 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using Cysharp.Threading.Tasks;
|
||||
using Game.Data;
|
||||
using Newtonsoft.Json;
|
||||
using UnityEngine;
|
||||
using WebSocketSharp;
|
||||
|
||||
|
@ -10,12 +13,12 @@ namespace Game
|
|||
{
|
||||
public interface ISocketManager
|
||||
{
|
||||
bool IsOpen { get; }
|
||||
void SetHttpToken(string token);
|
||||
void SetHttpKey(string requestKey);
|
||||
void Connect();
|
||||
UniTask ConnectAsync();
|
||||
void SendMessage(string message);
|
||||
UniTask<bool> SendMessageAsync(string message);
|
||||
void Connect(Action<string> callback = null);
|
||||
UniTask ConnectAsync(Action<string> callback = null);
|
||||
void SendMessage(Request request, Action<string> callback = null);
|
||||
UniTask<bool> SendMessageAsync(Request request, Action<string> callback = null);
|
||||
void CloseConnect();
|
||||
}
|
||||
|
||||
|
@ -23,66 +26,15 @@ namespace Game
|
|||
{
|
||||
private WebSocket _webSocket;
|
||||
private string token;
|
||||
private string requestKey;
|
||||
private bool isOpen;
|
||||
private bool isOpen = false;
|
||||
|
||||
public SocketManager()
|
||||
{
|
||||
token = default;
|
||||
requestKey = default;
|
||||
}
|
||||
public bool IsOpen => this.isOpen;
|
||||
|
||||
public void SetHttpToken(string token)
|
||||
{
|
||||
this.token = token;
|
||||
}
|
||||
|
||||
public void SetHttpKey(string requestKey)
|
||||
{
|
||||
this.requestKey = requestKey;
|
||||
}
|
||||
|
||||
async UniTask DisconnectAndReconnect()
|
||||
{
|
||||
// int time = 5;
|
||||
// int i = 0;
|
||||
// while (this.isOpen)
|
||||
// {
|
||||
// if (!this._webSocket.IsAlive)
|
||||
// {
|
||||
// i++;
|
||||
// await this.ConnectAsync();
|
||||
// Debug.Log($"断线了,重连了{i}次");
|
||||
// await UniTask.Yield();
|
||||
// }
|
||||
//
|
||||
// await UniTask.Yield();
|
||||
// }
|
||||
await UniTask.Yield();
|
||||
}
|
||||
|
||||
async UniTask Ping()
|
||||
{
|
||||
// float time = 0;
|
||||
// int i = 0;
|
||||
// while (this.isOpen)
|
||||
// {
|
||||
// time += Time.deltaTime;
|
||||
// if (time >= 5)
|
||||
// {
|
||||
// time = 0;
|
||||
// if (this._webSocket.IsAlive)
|
||||
// {
|
||||
// this._webSocket.Send("ping");
|
||||
// Debug.Log("ping");
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// await UniTask.Yield();
|
||||
// }
|
||||
await UniTask.Yield();
|
||||
}
|
||||
|
||||
private float timePing = 0;
|
||||
private float timeDis = 0;
|
||||
private int countDis = 0;
|
||||
|
@ -91,10 +43,10 @@ namespace Game
|
|||
{
|
||||
base.OnUpdate(dateTime);
|
||||
//
|
||||
if (this.isOpen && this._webSocket != null && !this._webSocket.IsAlive)
|
||||
if (this._webSocket != null && !this._webSocket.IsAlive)
|
||||
{
|
||||
timeDis += Time.deltaTime;
|
||||
if (this.timeDis >= 5)
|
||||
if (this.timeDis >= 0.3f)
|
||||
{
|
||||
countDis++;
|
||||
this.Connect();
|
||||
|
@ -117,23 +69,39 @@ namespace Game
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (this.jsonQueue.Count > 0)
|
||||
{
|
||||
var key = this.jsonQueue.Dequeue();
|
||||
var action = this.callbackQueue.Dequeue();
|
||||
action?.Invoke(key);
|
||||
}
|
||||
|
||||
if (this.passiveQueue.Count > 0)
|
||||
{
|
||||
var passive = this.passiveQueue.Dequeue();
|
||||
var json = this.passiveJsonQueue.Dequeue();
|
||||
EventManager.Instance.FireNow(this, new NetworkMessageEventArgs() { data = json, passiveResponse = passive });
|
||||
}
|
||||
}
|
||||
|
||||
public void Connect()
|
||||
protected override void OnDispose()
|
||||
{
|
||||
base.OnDispose();
|
||||
this.CloseConnect();
|
||||
}
|
||||
|
||||
public void Connect(Action<string> callback = null)
|
||||
{
|
||||
if (this._webSocket == null)
|
||||
{
|
||||
using (this._webSocket = new WebSocket(NetworkConst.socketUrl))
|
||||
{
|
||||
this.isOpen = true;
|
||||
Conn();
|
||||
this._webSocket.OnClose += OnClose;
|
||||
this._webSocket.OnOpen += OnOpen;
|
||||
this._webSocket.OnError += OnError;
|
||||
this._webSocket.OnMessage += OnMessage;
|
||||
DisconnectAndReconnect().Forget();
|
||||
this.Ping().Forget();
|
||||
}
|
||||
this._webSocket = new WebSocket(NetworkConst.socketUrl);
|
||||
this._webSocket.OnClose += OnClose;
|
||||
this._webSocket.OnOpen += OnOpen;
|
||||
this._webSocket.OnError += OnError;
|
||||
this._webSocket.OnMessage += OnMessage;
|
||||
|
||||
Conn();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -141,26 +109,23 @@ namespace Game
|
|||
}
|
||||
}
|
||||
|
||||
public async UniTask ConnectAsync()
|
||||
public async UniTask ConnectAsync(Action<string> callback = null)
|
||||
{
|
||||
if (this._webSocket == null)
|
||||
{
|
||||
using (this._webSocket = new WebSocket(NetworkConst.socketUrl))
|
||||
{
|
||||
this.isOpen = true;
|
||||
Conn();
|
||||
await UniTask.Yield();
|
||||
this._webSocket.OnClose += OnClose;
|
||||
this._webSocket.OnOpen += OnOpen;
|
||||
this._webSocket.OnError += OnError;
|
||||
this._webSocket.OnMessage += OnMessage;
|
||||
DisconnectAndReconnect().Forget();
|
||||
this.Ping().Forget();
|
||||
}
|
||||
this._webSocket = new WebSocket(NetworkConst.socketUrl);
|
||||
this._webSocket.OnClose += OnClose;
|
||||
this._webSocket.OnOpen += OnOpen;
|
||||
this._webSocket.OnError += OnError;
|
||||
this._webSocket.OnMessage += OnMessage;
|
||||
|
||||
Conn();
|
||||
await UniTask.Yield();
|
||||
}
|
||||
else
|
||||
{
|
||||
Conn();
|
||||
|
||||
await UniTask.Yield();
|
||||
}
|
||||
}
|
||||
|
@ -168,17 +133,77 @@ namespace Game
|
|||
void Conn()
|
||||
{
|
||||
this._webSocket.Connect();
|
||||
|
||||
Login();
|
||||
}
|
||||
|
||||
public void SendMessage(string message)
|
||||
void Login()
|
||||
{
|
||||
C2S_Login request = new C2S_Login();
|
||||
request.token = this.token;
|
||||
SendMessage(request, CallBack);
|
||||
|
||||
void CallBack(string json)
|
||||
{
|
||||
var response = JsonConvert.DeserializeObject<S2C_Login>(json);
|
||||
switch ((ResponseCode)response.code)
|
||||
{
|
||||
case ResponseCode.Success:
|
||||
|
||||
var s2CLogin = (S2C_Login)response;
|
||||
Game.currentPlayerData = s2CLogin.data;
|
||||
if (isOpen)
|
||||
Debug.Log("断线重连,登录成功");
|
||||
else
|
||||
Debug.Log("登录成功");
|
||||
break;
|
||||
case ResponseCode.Error:
|
||||
if (isOpen)
|
||||
Debug.Log("断线重连,登录失败");
|
||||
else
|
||||
Debug.Log("登录失败");
|
||||
break;
|
||||
default:
|
||||
throw new ArgumentOutOfRangeException();
|
||||
}
|
||||
|
||||
isOpen = true;
|
||||
}
|
||||
}
|
||||
|
||||
public void SendMessage(Request request, Action<string> callback = null)
|
||||
{
|
||||
Guid guid = Guid.NewGuid();
|
||||
var key = guid.ToString();
|
||||
request.requestKey = key;
|
||||
|
||||
if (callback != null)
|
||||
callbacks?.Add(key, callback);
|
||||
var message = JsonConvert.SerializeObject(request);
|
||||
|
||||
this._webSocket.Send(message);
|
||||
}
|
||||
|
||||
public async UniTask<bool> SendMessageAsync(string message)
|
||||
private Dictionary<string, Action<string>> callbacks = new Dictionary<string, Action<string>>();
|
||||
private Queue<Action<string>> callbackQueue = new Queue<Action<string>>();
|
||||
private Queue<string> jsonQueue = new Queue<string>();
|
||||
|
||||
private Queue<PassiveResponse> passiveQueue = new Queue<PassiveResponse>();
|
||||
private Queue<string> passiveJsonQueue = new Queue<string>();
|
||||
|
||||
public async UniTask<bool> SendMessageAsync(Request request, Action<string> callback = null)
|
||||
{
|
||||
int index = -1;
|
||||
|
||||
var key = GenKey.GenerateRandomString();
|
||||
request.requestKey = key;
|
||||
|
||||
if (callback != null)
|
||||
callbacks.Add(key, callback);
|
||||
var message = JsonConvert.SerializeObject(request);
|
||||
|
||||
this._webSocket.SendAsync(message, b => { index = b ? 0 : 1; });
|
||||
|
||||
while (true)
|
||||
{
|
||||
if (index != -1)
|
||||
|
@ -191,6 +216,7 @@ namespace Game
|
|||
public void CloseConnect()
|
||||
{
|
||||
this.isOpen = false;
|
||||
if (this._webSocket == null) return;
|
||||
this._webSocket.Close();
|
||||
this._webSocket.OnClose -= OnClose;
|
||||
this._webSocket.OnOpen -= OnOpen;
|
||||
|
@ -198,12 +224,71 @@ namespace Game
|
|||
this._webSocket.OnMessage -= OnMessage;
|
||||
this._webSocket = null;
|
||||
token = default;
|
||||
requestKey = default;
|
||||
}
|
||||
|
||||
private void OnMessage(object sender, MessageEventArgs e)
|
||||
{
|
||||
UnityEngine.Debug.Log($"OnMessage : {e.Data}");
|
||||
|
||||
if (e.Data.Contains("ping"))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
var passiveResponse = JsonConvert.DeserializeObject<PassiveResponse>(e.Data);
|
||||
if (!string.IsNullOrEmpty(passiveResponse.messageType))
|
||||
{
|
||||
// s2c
|
||||
passiveQueue.Enqueue(passiveResponse);
|
||||
this.passiveJsonQueue.Enqueue(e.Data);
|
||||
return;
|
||||
}
|
||||
}
|
||||
catch (Exception exception)
|
||||
{
|
||||
Debug.Log($"{e.Data} 不是服务器主动推送的消息");
|
||||
}
|
||||
|
||||
Response response = null;
|
||||
try
|
||||
{
|
||||
response = JsonConvert.DeserializeObject<Response>(e.Data);
|
||||
if (this.callbacks.TryGetValue(response.requestKey, out var value))
|
||||
{
|
||||
this.callbackQueue.Enqueue(value);
|
||||
this.jsonQueue.Enqueue(e.Data);
|
||||
this.callbacks.Remove(response.requestKey);
|
||||
}
|
||||
}
|
||||
catch (Exception exception)
|
||||
{
|
||||
Debug.Log($"解析失败,数据是:{e.Data} \n不是请求回复的消息");
|
||||
}
|
||||
|
||||
// try
|
||||
// {
|
||||
// response = JsonConvert.DeserializeObject<Response>(e.Data);
|
||||
// }
|
||||
// finally
|
||||
// {
|
||||
// if (this.callbacks.TryGetValue(response.requestKey, out var value))
|
||||
// {
|
||||
// this.callbackQueue.Enqueue(value);
|
||||
// this.jsonQueue.Enqueue(e.Data);
|
||||
// this.callbacks.Remove(response.requestKey);
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// Debug.Log($"解析失败,数据是:{e.Data} \n不是请求回复的消息");
|
||||
//
|
||||
// if (response != null && this.callbacks.TryGetValue(response.requestKey, out var value))
|
||||
// {
|
||||
// this.callbackQueue.Enqueue(value);
|
||||
// this.jsonQueue.Enqueue(e.Data);
|
||||
// this.callbacks.Remove(response.requestKey);
|
||||
// }
|
||||
}
|
||||
|
||||
private void OnError(object sender, ErrorEventArgs e)
|
||||
|
@ -213,9 +298,8 @@ namespace Game
|
|||
|
||||
private void OnOpen(object sender, EventArgs e)
|
||||
{
|
||||
// UnityEngine.Debug.Log($"OnOpen : {e}");
|
||||
Debug.Log("token is " + this.token);
|
||||
this._webSocket.Send($"{{\n\t\"requestKey\": \"{this.requestKey}\",\n\t\"token\": \"{this.token}\"\n}}");
|
||||
UnityEngine.Debug.Log($"OnOpen : {e}");
|
||||
}
|
||||
|
||||
private void OnClose(object sender, CloseEventArgs e)
|
||||
|
|
|
@ -0,0 +1,121 @@
|
|||
using System;
|
||||
using System.Reflection;
|
||||
using Game.Data;
|
||||
using Game.Dinosaurs;
|
||||
using UnityEngine;
|
||||
using Random = UnityEngine.Random;
|
||||
|
||||
namespace Game
|
||||
{
|
||||
public class NetworkTest : MonoBehaviour
|
||||
{
|
||||
private S2C_EnterGameData _enterGameData;
|
||||
|
||||
private int roomId;
|
||||
|
||||
private void Start()
|
||||
{
|
||||
EventManager.Instance.Subscribe(NetworkMessageEventArgs.EventId, NetworkMessageEvent);
|
||||
}
|
||||
|
||||
private void Update()
|
||||
{
|
||||
if (Input.GetKeyDown(KeyCode.Q))
|
||||
{
|
||||
var c2SEnterGameData = new C2S_EnterGameData();
|
||||
Game.socketManager.SendMessage(c2SEnterGameData, EnterGame);
|
||||
}
|
||||
|
||||
if (Input.GetKeyDown(KeyCode.W))
|
||||
{
|
||||
var c2SJoinRoom = new C2S_JoinRoom();
|
||||
c2SJoinRoom.lunId = this._enterGameData.data.lunId;
|
||||
var range = Random.Range(1, 9);
|
||||
this.roomId = range;
|
||||
c2SJoinRoom.roomId = range.ToString();
|
||||
Game.socketManager.SendMessage(c2SJoinRoom, JoinRoom);
|
||||
}
|
||||
|
||||
if (Input.GetKeyDown(KeyCode.E))
|
||||
{
|
||||
var c2SBetting = new C2S_Betting();
|
||||
c2SBetting.lunId = this._enterGameData.data.lunId;
|
||||
c2SBetting.roomId = this.roomId.ToString();
|
||||
c2SBetting.money = Random.Range(1f, 5f);
|
||||
Game.socketManager.SendMessage(c2SBetting, Betting);
|
||||
}
|
||||
|
||||
if (Input.GetKeyDown(KeyCode.R))
|
||||
{
|
||||
var assembly = Assembly.GetExecutingAssembly();
|
||||
var type1 = assembly.GetType("DinosaursGameManager");
|
||||
var instance = Activator.CreateInstance(type1);
|
||||
var dinosaursGameManager = instance as DinosaursGameManager;
|
||||
dinosaursGameManager?.StartGame();
|
||||
}
|
||||
|
||||
if (Input.GetKeyDown(KeyCode.T))
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
private void Betting(string obj)
|
||||
{
|
||||
var data = CommonHelper.DeserializeObject<S2C_Betting>(obj);
|
||||
}
|
||||
|
||||
private void JoinRoom(string obj)
|
||||
{
|
||||
var data = CommonHelper.DeserializeObject<S2C_JoinRoom>(obj);
|
||||
}
|
||||
|
||||
private void EnterGame(string obj)
|
||||
{
|
||||
this._enterGameData = CommonHelper.DeserializeObject<S2C_EnterGameData>(obj);
|
||||
}
|
||||
|
||||
private void NetworkMessageEvent(object sender, GameEventArgs e)
|
||||
{
|
||||
var args = e as NetworkMessageEventArgs;
|
||||
// switch (args.response.messageType)
|
||||
// {
|
||||
// case "klNewRoomList": // 消息类型-最新的所在房间位置
|
||||
// var s2CRoomDataRefresh = CommonHelper.DeserializeObject<S2C_RoomDataRefresh>(args.data);
|
||||
// if (s2CRoomDataRefresh.lunId != this.lunId) return;
|
||||
//
|
||||
// foreach (var roomInfo in s2CRoomDataRefresh.roomList)
|
||||
// {
|
||||
// this._roomManager.RoomMoneyRefresh((RoomType)roomInfo.roomId, roomInfo.moneys);
|
||||
// }
|
||||
//
|
||||
// break;
|
||||
// case "klStartAttack": // 消息类型-开始恐龙袭击
|
||||
// var s2CBossStartAttack = CommonHelper.DeserializeObject<S2C_BossStartAttack>(args.data);
|
||||
// if (s2CBossStartAttack.lunId != this.lunId) return;
|
||||
//
|
||||
// Attack(s2CBossStartAttack).Forget();
|
||||
// break;
|
||||
// case "klNewLunStart": // 消息类型-新一轮游戏开始了
|
||||
// var s2CStartNewGame = CommonHelper.DeserializeObject<S2C_StartNewGame>(args.data);
|
||||
// // if (s2CStartNewGame.lunId != this.lunId) return;
|
||||
// StartNewGame(s2CStartNewGame);
|
||||
// break;
|
||||
// case "klGameOver": // 消息类型-新一轮游戏开始了
|
||||
// var s2CBalance = CommonHelper.DeserializeObject<S2C_Balance>(args.data);
|
||||
// if (s2CBalance.lunId != this.lunId) return;
|
||||
//
|
||||
// ShowBalanceUI(s2CBalance).Forget();
|
||||
// break;
|
||||
// case "klUserNewRoom": // 消息类型-该成员房间变动
|
||||
// var s2CPlayerSwitchRoom = CommonHelper.DeserializeObject<S2C_PlayerSwitchRoom>(args.data);
|
||||
// if (s2CPlayerSwitchRoom.lunId != this.lunId) return;
|
||||
//
|
||||
// var player = this._playerManager.GetPlayer(s2CPlayerSwitchRoom.uId);
|
||||
// this._roomManager.JoinRoomAsync((RoomType)s2CPlayerSwitchRoom.roomId, player, default).Forget();
|
||||
// break;
|
||||
// default:
|
||||
// break;
|
||||
// }
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,3 @@
|
|||
fileFormatVersion: 2
|
||||
guid: f08e0c8f26e34bcbbd363349498d8f7d
|
||||
timeCreated: 1714786013
|
|
@ -1,13 +1,5 @@
|
|||
using System.Collections.Generic;
|
||||
using Game.Pathfinding;
|
||||
using JetBrains.Annotations;
|
||||
using UnityEngine;
|
||||
using System.Linq;
|
||||
using System.Threading;
|
||||
using Cysharp.Threading.Tasks;
|
||||
using Game.Data;
|
||||
using Game.Dinosaurs;
|
||||
using Game.RayCast;
|
||||
using Game.Room;
|
||||
|
||||
namespace Game
|
||||
{
|
||||
|
@ -22,12 +14,9 @@ namespace Game
|
|||
{
|
||||
base.OnEnter();
|
||||
EventManager.Instance.Subscribe(BackHallSSceneEventArgs.EventId, this.BackHallSceneEvent);
|
||||
EventManager.Instance.Subscribe(AddRobotEventArgs.EventId, this.AddRobotEvent);
|
||||
EventManager.Instance.Subscribe(DeleteAllRobotEventArgs.EventId, this.DeleteAllRobotEvent);
|
||||
|
||||
_dinosaursGameManager = new DinosaursGameManager();
|
||||
sceneMainUI = Game.uiManager.GetUI<GameSceneMainUI>(UIType.GameSceneMainUI);
|
||||
this.sceneMainUI.SetDinosaursGame(this._dinosaursGameManager);
|
||||
|
||||
_dinosaursGameManager.Init();
|
||||
_dinosaursGameManager.StartGame();
|
||||
|
@ -44,30 +33,38 @@ namespace Game
|
|||
this._dinosaursGameManager.robotManager.DeleteAllRobot();
|
||||
}
|
||||
|
||||
private void AddRobotEvent(object sender, GameEventArgs e)
|
||||
{
|
||||
this._dinosaursGameManager.robotManager.CreateRobot();
|
||||
}
|
||||
|
||||
private void BackHallSceneEvent(object sender, GameEventArgs e)
|
||||
{
|
||||
if (!_dinosaursGameManager.playerManager.currentPlayer.IsCanDelete)
|
||||
return;
|
||||
Game.uiManager.CloseAll();
|
||||
|
||||
// TODO
|
||||
Game.resourceManager.UnloadSceneAsync(AssetConstPath.Assets_GameRes_Scene_Game);
|
||||
_dinosaursGameManager.Dispose();
|
||||
var c2SExitGame = new C2S_ExitGame();
|
||||
c2SExitGame.lunId = this._dinosaursGameManager.lunId;
|
||||
Game.socketManager.SendMessage(c2SExitGame, Callback);
|
||||
|
||||
Game.uiManager.ShowUI(UIType.HallSceneMainUI);
|
||||
Game.procedureManager.ChangeProcedure(ProcedureType.HallSceneMainLogicProcedure);
|
||||
void Callback(string obj)
|
||||
{
|
||||
var s2CExitGame = CommonHelper.DeserializeObject<S2C_ExitGame>(obj);
|
||||
if (s2CExitGame.code == ResponseCode.Success)
|
||||
{
|
||||
Game.uiManager.CloseAll();
|
||||
|
||||
// TODO
|
||||
Game.resourceManager.UnloadSceneAsync(AssetConstPath.Assets_GameRes_Scene_Game);
|
||||
_dinosaursGameManager.Dispose();
|
||||
this._dinosaursGameManager = null;
|
||||
|
||||
Game.uiManager.ShowUI(UIType.HallSceneMainUI);
|
||||
Game.procedureManager.ChangeProcedure(ProcedureType.HallSceneMainLogicProcedure);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnLeave()
|
||||
{
|
||||
base.OnLeave();
|
||||
EventManager.Instance.Unsubscribe(BackHallSSceneEventArgs.EventId, this.BackHallSceneEvent);
|
||||
EventManager.Instance.Unsubscribe(AddRobotEventArgs.EventId, this.AddRobotEvent);
|
||||
// EventManager.Instance.Unsubscribe(AddRobotEventArgs.EventId, this.AddRobotEvent);
|
||||
EventManager.Instance.Unsubscribe(DeleteAllRobotEventArgs.EventId, this.DeleteAllRobotEvent);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -20,9 +20,10 @@ namespace Game
|
|||
private void InputNameFinishEvent(object sender, GameEventArgs e)
|
||||
{
|
||||
var args = e as InputNameFinishEventArgs;
|
||||
Game.currentPlayerData = new GlobalPlayerData(args.playerName, 1, 1000);
|
||||
// var player = Game.playerManager.CreatePlayer(args.playerName, 1000);
|
||||
// Game.playerManager.SetCurrentPlayer(player);
|
||||
|
||||
Game.socketManager.ConnectAsync();
|
||||
Game.procedureManager.ChangeProcedure(ProcedureType.HallSceneMainLogicProcedure);
|
||||
}
|
||||
|
||||
|
|
|
@ -46,7 +46,6 @@ namespace Game.Spine
|
|||
private void Start()
|
||||
{
|
||||
this._skeletonAnimation.state.Complete += Finish;
|
||||
this.StopAni();
|
||||
}
|
||||
|
||||
private void OnDestroy()
|
||||
|
|
|
@ -153,13 +153,13 @@ namespace Game
|
|||
|
||||
if (Input.GetKeyDown(KeyCode.S))
|
||||
{
|
||||
Game.socketManager.CloseConnect();
|
||||
// Game.socketManager.CloseConnect();
|
||||
}
|
||||
|
||||
if (Input.GetKeyDown(KeyCode.D))
|
||||
{
|
||||
// this.istrue2 = false;
|
||||
Game.socketManager.SendMessage(this.str);
|
||||
// Game.socketManager.SendMessage();
|
||||
|
||||
// _skeletonAnimation.AnimationName = "idle";
|
||||
|
||||
|
|
|
@ -77,11 +77,9 @@ namespace Game.MVVM.Model
|
|||
this.BindingContext.OnClickInvestment?.Invoke(f);
|
||||
}
|
||||
|
||||
public async UniTask WaitTimeCloseTips()
|
||||
public void IsShowTips(bool isShow)
|
||||
{
|
||||
this.imgTips.gameObject.SetActive(true);
|
||||
await UniTask.Delay(4000);
|
||||
this.imgTips.gameObject.SetActive(false);
|
||||
this.imgTips.gameObject.SetActive(isShow);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -58,7 +58,7 @@ namespace Game.MVVM.Model
|
|||
|
||||
public void OnClickButton(string id, string name)
|
||||
{
|
||||
Debug.Log($"点击了 {id} name is {name}");
|
||||
// Debug.Log($"点击了 {id} name is {name}");
|
||||
EventManager.Instance.FireNow(this, new HallSceneClickMenuEventArgs(id, name));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
using System.Globalization;
|
||||
using Cysharp.Threading.Tasks;
|
||||
using Game.Data;
|
||||
using Game.Dinosaurs;
|
||||
using Game.MVVM.Model;
|
||||
using TMPro;
|
||||
|
@ -50,16 +51,13 @@ namespace Game
|
|||
public void SetDinosaursGame(IDinosaursGameManager dinosaursGameManager)
|
||||
{
|
||||
_dinosaursGameManager = dinosaursGameManager;
|
||||
this.UpdateJinBei();
|
||||
}
|
||||
|
||||
private void PlayerJinBeiChange_ToMainUIEvent(object sender, GameEventArgs e)
|
||||
{
|
||||
var args = e as PlayerJinBeiChange_ToMainUIEventArgs;
|
||||
if (args.player == _dinosaursGameManager.playerManager.currentPlayer)
|
||||
{
|
||||
this.jinBei = 0;
|
||||
this.UpdateJinBei();
|
||||
}
|
||||
this.UpdateJinBei();
|
||||
}
|
||||
|
||||
private void BossStartMoveEvent(object sender, GameEventArgs e)
|
||||
|
@ -107,14 +105,16 @@ namespace Game
|
|||
}
|
||||
|
||||
jinBei = f;
|
||||
EventManager.Instance.FireNow(this, new PlayerJinBeiChange_ToPlayerEventArgs(_dinosaursGameManager.playerManager.currentPlayer, jinBei, ShowResult));
|
||||
|
||||
EventManager.Instance.FireNow(this, new ClickBettingButton_ToDinosaursEventArgs(jinBei, ShowResult));
|
||||
}
|
||||
|
||||
void ShowResult(bool result)
|
||||
{
|
||||
if (result)
|
||||
{
|
||||
EventManager.Instance.FireNow(this, new RoomJinBeiChangeEventArgs(_dinosaursGameManager.roomManager.currentRoom, _dinosaursGameManager.playerManager.currentPlayer, this.jinBei));
|
||||
// EventManager.Instance.FireNow(this, new RoomJinBeiChangeEventArgs(_dinosaursGameManager.roomManager.currentRoom, _dinosaursGameManager.playerManager.currentPlayer, this.jinBei));
|
||||
Game.currentPlayerData.money -= this.jinBei;
|
||||
UpdateJinBei();
|
||||
Debug.Log("投注成功");
|
||||
}
|
||||
|
@ -126,7 +126,7 @@ namespace Game
|
|||
|
||||
private void UpdateJinBei()
|
||||
{
|
||||
var j = _dinosaursGameManager.playerManager.currentPlayer.playerData.jinbei;
|
||||
var j = Game.currentPlayerData.money;
|
||||
this.view.BindingContext.JinBeiChange(j);
|
||||
this.jinBei = 0;
|
||||
}
|
||||
|
@ -136,10 +136,10 @@ namespace Game
|
|||
this.view.BindingContext.MessageChange(message);
|
||||
}
|
||||
|
||||
public async UniTask WaitTimeCloseTips()
|
||||
public void IsShowTips(bool isShow)
|
||||
{
|
||||
//
|
||||
await this.view.WaitTimeCloseTips();
|
||||
this.view.IsShowTips(isShow);
|
||||
}
|
||||
|
||||
private void ClickHelpButton()
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
Simulate
|
Binary file not shown.
|
@ -0,0 +1 @@
|
|||
7b0d0788440786a4c773bae30ec55f29
|
|
@ -0,0 +1,632 @@
|
|||
{
|
||||
"FileVersion": "2.0.0",
|
||||
"EnableAddressable": false,
|
||||
"LocationToLower": false,
|
||||
"IncludeAssetGUID": true,
|
||||
"OutputNameStyle": 0,
|
||||
"BuildPipeline": "BuiltinBuildPipeline",
|
||||
"PackageName": "DefaultPackage",
|
||||
"PackageVersion": "Simulate",
|
||||
"AssetList": [
|
||||
{
|
||||
"Address": "",
|
||||
"AssetPath": "Assets/GameRes/Art/da_tao_sha/001_0.png",
|
||||
"AssetGUID": "f4b9a97648f0c9b46933ce37988aacb7",
|
||||
"AssetTags": [],
|
||||
"BundleID": 0
|
||||
},
|
||||
{
|
||||
"Address": "",
|
||||
"AssetPath": "Assets/GameRes/Art/da_tao_sha/002_0.png",
|
||||
"AssetGUID": "ef6175d3ba539864785b93c1f49cd869",
|
||||
"AssetTags": [],
|
||||
"BundleID": 0
|
||||
},
|
||||
{
|
||||
"Address": "",
|
||||
"AssetPath": "Assets/GameRes/Art/da_tao_sha/003_0.png",
|
||||
"AssetGUID": "972e8922f9c13474c950cad5d59c76d9",
|
||||
"AssetTags": [],
|
||||
"BundleID": 0
|
||||
},
|
||||
{
|
||||
"Address": "",
|
||||
"AssetPath": "Assets/GameRes/Art/da_tao_sha/004_0.png",
|
||||
"AssetGUID": "79655e447c9581541897f5f5e7ca553d",
|
||||
"AssetTags": [],
|
||||
"BundleID": 0
|
||||
},
|
||||
{
|
||||
"Address": "",
|
||||
"AssetPath": "Assets/GameRes/Art/da_tao_sha/004_1.png",
|
||||
"AssetGUID": "239a39671af115644b1988671b33072e",
|
||||
"AssetTags": [],
|
||||
"BundleID": 0
|
||||
},
|
||||
{
|
||||
"Address": "",
|
||||
"AssetPath": "Assets/GameRes/Art/da_tao_sha/005_0.png",
|
||||
"AssetGUID": "9d63348fc3d36c54aa9b87d8089673af",
|
||||
"AssetTags": [],
|
||||
"BundleID": 0
|
||||
},
|
||||
{
|
||||
"Address": "",
|
||||
"AssetPath": "Assets/GameRes/Art/da_tao_sha/006_0.png",
|
||||
"AssetGUID": "42a6341a1d29b8c41a3a430c608d6cc4",
|
||||
"AssetTags": [],
|
||||
"BundleID": 0
|
||||
},
|
||||
{
|
||||
"Address": "",
|
||||
"AssetPath": "Assets/GameRes/Art/da_tao_sha/007_0.png",
|
||||
"AssetGUID": "8a31a11a162501243b12036a33f35ac7",
|
||||
"AssetTags": [],
|
||||
"BundleID": 0
|
||||
},
|
||||
{
|
||||
"Address": "",
|
||||
"AssetPath": "Assets/GameRes/Art/da_tao_sha/008_0.png",
|
||||
"AssetGUID": "621f75b96f7ca4941ad92358c34a2b18",
|
||||
"AssetTags": [],
|
||||
"BundleID": 0
|
||||
},
|
||||
{
|
||||
"Address": "",
|
||||
"AssetPath": "Assets/GameRes/Art/da_tao_sha/btn_jilu.png",
|
||||
"AssetGUID": "887d930fabcbb9e4ea7abba72931614a",
|
||||
"AssetTags": [],
|
||||
"BundleID": 0
|
||||
},
|
||||
{
|
||||
"Address": "",
|
||||
"AssetPath": "Assets/GameRes/Art/da_tao_sha/btn_paihangbang.png",
|
||||
"AssetGUID": "53fdb7f52c3044d40900062b464a491b",
|
||||
"AssetTags": [],
|
||||
"BundleID": 0
|
||||
},
|
||||
{
|
||||
"Address": "",
|
||||
"AssetPath": "Assets/GameRes/Art/da_tao_sha/btn_paihangbangdi.png",
|
||||
"AssetGUID": "f246a9baa6a59474c8f5454f15bec419",
|
||||
"AssetTags": [],
|
||||
"BundleID": 0
|
||||
},
|
||||
{
|
||||
"Address": "",
|
||||
"AssetPath": "Assets/GameRes/Art/da_tao_sha/btn_touruyinbei.png",
|
||||
"AssetGUID": "09c30f3e0f2cfb4419e46ca25e05a38f",
|
||||
"AssetTags": [],
|
||||
"BundleID": 0
|
||||
},
|
||||
{
|
||||
"Address": "",
|
||||
"AssetPath": "Assets/GameRes/Art/da_tao_sha/btn_xiabiao.png",
|
||||
"AssetGUID": "2e3f8c4474c2ec44abce2f4066a490bc",
|
||||
"AssetTags": [],
|
||||
"BundleID": 0
|
||||
},
|
||||
{
|
||||
"Address": "",
|
||||
"AssetPath": "Assets/GameRes/Art/da_tao_sha/btn_xuanzejinbei.png",
|
||||
"AssetGUID": "e09e06654a98e5e44bbfe77bcc248d7c",
|
||||
"AssetTags": [],
|
||||
"BundleID": 0
|
||||
},
|
||||
{
|
||||
"Address": "",
|
||||
"AssetPath": "Assets/GameRes/Art/da_tao_sha/img_dataoshaditu.png",
|
||||
"AssetGUID": "5601e9a74fbb9b14d92dfb0e05227e55",
|
||||
"AssetTags": [],
|
||||
"BundleID": 0
|
||||
},
|
||||
{
|
||||
"Address": "",
|
||||
"AssetPath": "Assets/GameRes/Art/da_tao_sha/img_duobishengli.png",
|
||||
"AssetGUID": "ae4c6483cea5ca24dbc503a049ea9ef9",
|
||||
"AssetTags": [],
|
||||
"BundleID": 0
|
||||
},
|
||||
{
|
||||
"Address": "",
|
||||
"AssetPath": "Assets/GameRes/Art/da_tao_sha/img_duobishibai.png",
|
||||
"AssetGUID": "51b55c072060cff40b6306dc117c7f3a",
|
||||
"AssetTags": [],
|
||||
"BundleID": 0
|
||||
},
|
||||
{
|
||||
"Address": "",
|
||||
"AssetPath": "Assets/GameRes/Art/da_tao_sha/img_konglong.png",
|
||||
"AssetGUID": "06e44328fc2d23742aa1a212f3d5ca6b",
|
||||
"AssetTags": [],
|
||||
"BundleID": 0
|
||||
},
|
||||
{
|
||||
"Address": "",
|
||||
"AssetPath": "Assets/GameRes/Art/da_tao_sha/img_liang1.png",
|
||||
"AssetGUID": "91c363a8ca8cc384b8d0bcae32382ebc",
|
||||
"AssetTags": [],
|
||||
"BundleID": 0
|
||||
},
|
||||
{
|
||||
"Address": "",
|
||||
"AssetPath": "Assets/GameRes/Art/da_tao_sha/img_liang2.png",
|
||||
"AssetGUID": "6fefd66b6ac2cea4e996ad5dd507efa1",
|
||||
"AssetTags": [],
|
||||
"BundleID": 0
|
||||
},
|
||||
{
|
||||
"Address": "",
|
||||
"AssetPath": "Assets/GameRes/Art/da_tao_sha/img_liang3.png",
|
||||
"AssetGUID": "7605fa3b9eb102b42a16ac65944d0171",
|
||||
"AssetTags": [],
|
||||
"BundleID": 0
|
||||
},
|
||||
{
|
||||
"Address": "",
|
||||
"AssetPath": "Assets/GameRes/Art/da_tao_sha/img_liang4.png",
|
||||
"AssetGUID": "fc8f2c141a0ee214bb2efebd297c2e8e",
|
||||
"AssetTags": [],
|
||||
"BundleID": 0
|
||||
},
|
||||
{
|
||||
"Address": "",
|
||||
"AssetPath": "Assets/GameRes/Art/da_tao_sha/img_liang5.png",
|
||||
"AssetGUID": "838cb1a5e46ec5145a567669e942e3fa",
|
||||
"AssetTags": [],
|
||||
"BundleID": 0
|
||||
},
|
||||
{
|
||||
"Address": "",
|
||||
"AssetPath": "Assets/GameRes/Art/da_tao_sha/img_liang6.png",
|
||||
"AssetGUID": "1df29913a73c0af4da160cd1561bc7f7",
|
||||
"AssetTags": [],
|
||||
"BundleID": 0
|
||||
},
|
||||
{
|
||||
"Address": "",
|
||||
"AssetPath": "Assets/GameRes/Art/da_tao_sha/img_liang7.png",
|
||||
"AssetGUID": "c94accab83f01f544a23019955fb1aba",
|
||||
"AssetTags": [],
|
||||
"BundleID": 0
|
||||
},
|
||||
{
|
||||
"Address": "",
|
||||
"AssetPath": "Assets/GameRes/Art/da_tao_sha/img_liang8.png",
|
||||
"AssetGUID": "3e56ce22fabdf7845aeca8e6adc0c2d7",
|
||||
"AssetTags": [],
|
||||
"BundleID": 0
|
||||
},
|
||||
{
|
||||
"Address": "",
|
||||
"AssetPath": "Assets/GameRes/Art/da_tao_sha/img_qiangdilaixi.png",
|
||||
"AssetGUID": "c15a6b666fdf63b4d9fb16c3349ddddf",
|
||||
"AssetTags": [],
|
||||
"BundleID": 0
|
||||
},
|
||||
{
|
||||
"Address": "",
|
||||
"AssetPath": "Assets/GameRes/Art/da_tao_sha/img_shuomingdi.png",
|
||||
"AssetGUID": "ddecf97d7ba2d8048bc6da617d693edc",
|
||||
"AssetTags": [],
|
||||
"BundleID": 0
|
||||
},
|
||||
{
|
||||
"Address": "",
|
||||
"AssetPath": "Assets/GameRes/Art/da_tao_sha/img_tanchuang.png",
|
||||
"AssetGUID": "4551133610016d8448b963d8b5dbe69a",
|
||||
"AssetTags": [],
|
||||
"BundleID": 0
|
||||
},
|
||||
{
|
||||
"Address": "",
|
||||
"AssetPath": "Assets/GameRes/Art/da_tao_sha/img_tu.png",
|
||||
"AssetGUID": "9ded8ae68cdcf0a4ab0a3140d0b20755",
|
||||
"AssetTags": [],
|
||||
"BundleID": 0
|
||||
},
|
||||
{
|
||||
"Address": "",
|
||||
"AssetPath": "Assets/GameRes/Art/da_tao_sha/img_tututu.png",
|
||||
"AssetGUID": "9d321e1ae7f060e4cb38bf61e98fafa8",
|
||||
"AssetTags": [],
|
||||
"BundleID": 0
|
||||
},
|
||||
{
|
||||
"Address": "",
|
||||
"AssetPath": "Assets/GameRes/Art/da_tao_sha/img_youshangjiaokuang.png",
|
||||
"AssetGUID": "90dba40848748b14290eaab2a4610036",
|
||||
"AssetTags": [],
|
||||
"BundleID": 0
|
||||
},
|
||||
{
|
||||
"Address": "",
|
||||
"AssetPath": "Assets/GameRes/Art/da_tao_sha/img_zha_lan.png",
|
||||
"AssetGUID": "1ae5fe5d31d443b40a675575d9c348cc",
|
||||
"AssetTags": [],
|
||||
"BundleID": 0
|
||||
},
|
||||
{
|
||||
"Address": "",
|
||||
"AssetPath": "Assets/GameRes/Art/da_tao_sha/jinbei.png",
|
||||
"AssetGUID": "1387f2ea4c6b8cd489fdec63581550bf",
|
||||
"AssetTags": [],
|
||||
"BundleID": 0
|
||||
},
|
||||
{
|
||||
"Address": "",
|
||||
"AssetPath": "Assets/GameRes/Art/da_tao_sha/骨骼动画/bossani/boss.atlas.txt",
|
||||
"AssetGUID": "2647f1780822a464ea10c9ac51a3b638",
|
||||
"AssetTags": [],
|
||||
"BundleID": 1
|
||||
},
|
||||
{
|
||||
"Address": "",
|
||||
"AssetPath": "Assets/GameRes/Art/da_tao_sha/骨骼动画/bossani/boss.json",
|
||||
"AssetGUID": "c67884c1a209eb54aafa59d7f409ac31",
|
||||
"AssetTags": [],
|
||||
"BundleID": 1
|
||||
},
|
||||
{
|
||||
"Address": "",
|
||||
"AssetPath": "Assets/GameRes/Art/da_tao_sha/骨骼动画/bossani/boss.png",
|
||||
"AssetGUID": "dff103f0f185e884f871d57788f7e237",
|
||||
"AssetTags": [],
|
||||
"BundleID": 1
|
||||
},
|
||||
{
|
||||
"Address": "",
|
||||
"AssetPath": "Assets/GameRes/Art/da_tao_sha/骨骼动画/bossani/boss_Atlas.asset",
|
||||
"AssetGUID": "2e25c12e84278384abf5b14fbd7479a3",
|
||||
"AssetTags": [],
|
||||
"BundleID": 1
|
||||
},
|
||||
{
|
||||
"Address": "",
|
||||
"AssetPath": "Assets/GameRes/Art/da_tao_sha/骨骼动画/bossani/boss_Material.mat",
|
||||
"AssetGUID": "8e783972ca12b4543a06eb2ef9658a0b",
|
||||
"AssetTags": [],
|
||||
"BundleID": 1
|
||||
},
|
||||
{
|
||||
"Address": "",
|
||||
"AssetPath": "Assets/GameRes/Art/da_tao_sha/骨骼动画/bossani/boss_SkeletonData.asset",
|
||||
"AssetGUID": "ba1a29dd9f5a57c4c996796d60210953",
|
||||
"AssetTags": [],
|
||||
"BundleID": 1
|
||||
},
|
||||
{
|
||||
"Address": "",
|
||||
"AssetPath": "Assets/GameRes/Art/da_tao_sha/骨骼动画/playerani/player.controller",
|
||||
"AssetGUID": "7774ae09935655344975c1fe1b19806a",
|
||||
"AssetTags": [],
|
||||
"BundleID": 2
|
||||
},
|
||||
{
|
||||
"Address": "",
|
||||
"AssetPath": "Assets/GameRes/Art/da_tao_sha/骨骼动画/playerani/role.atlas.txt",
|
||||
"AssetGUID": "c4e9fa676a36fca42ae3124836f903a4",
|
||||
"AssetTags": [],
|
||||
"BundleID": 2
|
||||
},
|
||||
{
|
||||
"Address": "",
|
||||
"AssetPath": "Assets/GameRes/Art/da_tao_sha/骨骼动画/playerani/role.json",
|
||||
"AssetGUID": "3dd1183cedbe2484ead6e82c590c3bd9",
|
||||
"AssetTags": [],
|
||||
"BundleID": 2
|
||||
},
|
||||
{
|
||||
"Address": "",
|
||||
"AssetPath": "Assets/GameRes/Art/da_tao_sha/骨骼动画/playerani/role.png",
|
||||
"AssetGUID": "87e011827f029574189e430b0224706a",
|
||||
"AssetTags": [],
|
||||
"BundleID": 2
|
||||
},
|
||||
{
|
||||
"Address": "",
|
||||
"AssetPath": "Assets/GameRes/Art/da_tao_sha/骨骼动画/playerani/role_Atlas.asset",
|
||||
"AssetGUID": "fd7b2060bf769af47a03d6940d1e2d74",
|
||||
"AssetTags": [],
|
||||
"BundleID": 2
|
||||
},
|
||||
{
|
||||
"Address": "",
|
||||
"AssetPath": "Assets/GameRes/Art/da_tao_sha/骨骼动画/playerani/role_Material.mat",
|
||||
"AssetGUID": "66bba0d954ad5d740975f7e0221d035d",
|
||||
"AssetTags": [],
|
||||
"BundleID": 2
|
||||
},
|
||||
{
|
||||
"Address": "",
|
||||
"AssetPath": "Assets/GameRes/Art/da_tao_sha/骨骼动画/playerani/role_SkeletonData.asset",
|
||||
"AssetGUID": "90c2a990b3dd007428bef09b8008449e",
|
||||
"AssetTags": [],
|
||||
"BundleID": 2
|
||||
},
|
||||
{
|
||||
"Address": "",
|
||||
"AssetPath": "Assets/GameRes/Material/New Material.mat",
|
||||
"AssetGUID": "91e707467b63f214c88b68cbee29d15e",
|
||||
"AssetTags": [],
|
||||
"BundleID": 3
|
||||
},
|
||||
{
|
||||
"Address": "",
|
||||
"AssetPath": "Assets/GameRes/Prefabs/Role/boss1.prefab",
|
||||
"AssetGUID": "60ea6f5752150564a87c0a39a76fcd0f",
|
||||
"AssetTags": [],
|
||||
"BundleID": 4
|
||||
},
|
||||
{
|
||||
"Address": "",
|
||||
"AssetPath": "Assets/GameRes/Prefabs/Role/player1.prefab",
|
||||
"AssetGUID": "c2b620b15b666aa4783e36f2ce45f360",
|
||||
"AssetTags": [],
|
||||
"BundleID": 4
|
||||
},
|
||||
{
|
||||
"Address": "",
|
||||
"AssetPath": "Assets/GameRes/Prefabs/Room/伏龙阁.prefab",
|
||||
"AssetGUID": "a2b94cf198fab4b4b8711b41e8b99945",
|
||||
"AssetTags": [],
|
||||
"BundleID": 5
|
||||
},
|
||||
{
|
||||
"Address": "",
|
||||
"AssetPath": "Assets/GameRes/Prefabs/Room/先祖大厅.prefab",
|
||||
"AssetGUID": "c20631e262e56e34185f208c7c32dbde",
|
||||
"AssetTags": [],
|
||||
"BundleID": 5
|
||||
},
|
||||
{
|
||||
"Address": "",
|
||||
"AssetPath": "Assets/GameRes/Prefabs/Room/出生点.prefab",
|
||||
"AssetGUID": "608c264b03be86c4981432274e01955a",
|
||||
"AssetTags": [],
|
||||
"BundleID": 5
|
||||
},
|
||||
{
|
||||
"Address": "",
|
||||
"AssetPath": "Assets/GameRes/Prefabs/Room/圣龙残骸.prefab",
|
||||
"AssetGUID": "9adbd79be1379e141b048440ff6a1f4c",
|
||||
"AssetTags": [],
|
||||
"BundleID": 5
|
||||
},
|
||||
{
|
||||
"Address": "",
|
||||
"AssetPath": "Assets/GameRes/Prefabs/Room/天池遗址.prefab",
|
||||
"AssetGUID": "2581d9b3f888d48459f244842b08347d",
|
||||
"AssetTags": [],
|
||||
"BundleID": 5
|
||||
},
|
||||
{
|
||||
"Address": "",
|
||||
"AssetPath": "Assets/GameRes/Prefabs/Room/杂物室.prefab",
|
||||
"AssetGUID": "f16c511c39f531a4882aad988ad496a0",
|
||||
"AssetTags": [],
|
||||
"BundleID": 5
|
||||
},
|
||||
{
|
||||
"Address": "",
|
||||
"AssetPath": "Assets/GameRes/Prefabs/Room/沙慕龙阁.prefab",
|
||||
"AssetGUID": "b604cde4e00797941a1d5d8382c2afca",
|
||||
"AssetTags": [],
|
||||
"BundleID": 5
|
||||
},
|
||||
{
|
||||
"Address": "",
|
||||
"AssetPath": "Assets/GameRes/Prefabs/Room/英雄圣殿.prefab",
|
||||
"AssetGUID": "3fba1509011b7a040bdb3c884ea1513d",
|
||||
"AssetTags": [],
|
||||
"BundleID": 5
|
||||
},
|
||||
{
|
||||
"Address": "",
|
||||
"AssetPath": "Assets/GameRes/Prefabs/Room/训练堂.prefab",
|
||||
"AssetGUID": "dfd1bce58e2501945b27c6af62862fdc",
|
||||
"AssetTags": [],
|
||||
"BundleID": 5
|
||||
},
|
||||
{
|
||||
"Address": "",
|
||||
"AssetPath": "Assets/GameRes/Prefabs/UI/GameSceneHelpUI.prefab",
|
||||
"AssetGUID": "e382a424151ac19419b4df8b7e77b3dc",
|
||||
"AssetTags": [],
|
||||
"BundleID": 6
|
||||
},
|
||||
{
|
||||
"Address": "",
|
||||
"AssetPath": "Assets/GameRes/Prefabs/UI/GameSceneMainUI.prefab",
|
||||
"AssetGUID": "d1b2663086dab0b45951609a9554c79a",
|
||||
"AssetTags": [],
|
||||
"BundleID": 6
|
||||
},
|
||||
{
|
||||
"Address": "",
|
||||
"AssetPath": "Assets/GameRes/Prefabs/UI/GameSceneResultUI.prefab",
|
||||
"AssetGUID": "8e764c05da823bb48abb4e3a098097b9",
|
||||
"AssetTags": [],
|
||||
"BundleID": 6
|
||||
},
|
||||
{
|
||||
"Address": "",
|
||||
"AssetPath": "Assets/GameRes/Prefabs/UI/GameStorePurchaseUI.prefab",
|
||||
"AssetGUID": "ad544896113bc3c4c881629c33b0f2b5",
|
||||
"AssetTags": [],
|
||||
"BundleID": 6
|
||||
},
|
||||
{
|
||||
"Address": "",
|
||||
"AssetPath": "Assets/GameRes/Prefabs/UI/GlobalLogOnlyAppUI.prefab",
|
||||
"AssetGUID": "d45cac04060c7ac4d80e4639ab6b3fc3",
|
||||
"AssetTags": [],
|
||||
"BundleID": 6
|
||||
},
|
||||
{
|
||||
"Address": "",
|
||||
"AssetPath": "Assets/GameRes/Prefabs/UI/GlobalTipsUI.prefab",
|
||||
"AssetGUID": "7fe4d84aa389d964ea6ffda220b24373",
|
||||
"AssetTags": [],
|
||||
"BundleID": 6
|
||||
},
|
||||
{
|
||||
"Address": "",
|
||||
"AssetPath": "Assets/GameRes/Prefabs/UI/HallSceneMainUI.prefab",
|
||||
"AssetGUID": "f7c5ee18df3601a499fcb7d35bb51def",
|
||||
"AssetTags": [],
|
||||
"BundleID": 6
|
||||
},
|
||||
{
|
||||
"Address": "",
|
||||
"AssetPath": "Assets/GameRes/Prefabs/UI/HallSceneMallUI.prefab",
|
||||
"AssetGUID": "f03f2ed22729de948b80f66bd8773279",
|
||||
"AssetTags": [],
|
||||
"BundleID": 6
|
||||
},
|
||||
{
|
||||
"Address": "",
|
||||
"AssetPath": "Assets/GameRes/Prefabs/UI/InputNameUI.prefab",
|
||||
"AssetGUID": "6707b9d2f77a45a4a835c0efa1baae89",
|
||||
"AssetTags": [],
|
||||
"BundleID": 6
|
||||
},
|
||||
{
|
||||
"Address": "",
|
||||
"AssetPath": "Assets/GameRes/Prefabs/UI/LoadingGameSceneUI.prefab",
|
||||
"AssetGUID": "c86a076e336365841966967a5b50a3e7",
|
||||
"AssetTags": [],
|
||||
"BundleID": 6
|
||||
},
|
||||
{
|
||||
"Address": "",
|
||||
"AssetPath": "Assets/GameRes/Prefabs/UI/Item/Scroll View List.prefab",
|
||||
"AssetGUID": "111ddf1b32ef50e4aba26a272afcce87",
|
||||
"AssetTags": [],
|
||||
"BundleID": 7
|
||||
},
|
||||
{
|
||||
"Address": "",
|
||||
"AssetPath": "Assets/GameRes/Scene/Game.unity",
|
||||
"AssetGUID": "4c5cb2738d3f5474795651032ffe20a6",
|
||||
"AssetTags": [],
|
||||
"BundleID": 8
|
||||
},
|
||||
{
|
||||
"Address": "",
|
||||
"AssetPath": "Assets/GameRes/Scene/Hall.unity",
|
||||
"AssetGUID": "1c7e643baad163046834e3a651e1381f",
|
||||
"AssetTags": [],
|
||||
"BundleID": 8
|
||||
},
|
||||
{
|
||||
"Address": "",
|
||||
"AssetPath": "Assets/GameRes/Config/StoreConfig.txt",
|
||||
"AssetGUID": "0584300f38aadd947acd6fef692a9060",
|
||||
"AssetTags": [],
|
||||
"BundleID": 9
|
||||
}
|
||||
],
|
||||
"BundleList": [
|
||||
{
|
||||
"BundleName": "defaultpackage_assets_gameres_art_da_tao_sha.bundle",
|
||||
"UnityCRC": 0,
|
||||
"FileHash": "45ace43a5c2780f0e73ff26641df7a2a",
|
||||
"FileCRC": "00000000",
|
||||
"FileSize": 1337264,
|
||||
"Encrypted": false,
|
||||
"Tags": [],
|
||||
"DependIDs": []
|
||||
},
|
||||
{
|
||||
"BundleName": "defaultpackage_assets_gameres_art_da_tao_sha_骨骼动画_bossani.bundle",
|
||||
"UnityCRC": 0,
|
||||
"FileHash": "a1545a08610aa0b8d1a563eae4ad5061",
|
||||
"FileCRC": "00000000",
|
||||
"FileSize": 484376,
|
||||
"Encrypted": false,
|
||||
"Tags": [],
|
||||
"DependIDs": []
|
||||
},
|
||||
{
|
||||
"BundleName": "defaultpackage_assets_gameres_art_da_tao_sha_骨骼动画_playerani.bundle",
|
||||
"UnityCRC": 0,
|
||||
"FileHash": "343e628b078fd5253337ccb086af31a3",
|
||||
"FileCRC": "00000000",
|
||||
"FileSize": 783369,
|
||||
"Encrypted": false,
|
||||
"Tags": [],
|
||||
"DependIDs": []
|
||||
},
|
||||
{
|
||||
"BundleName": "defaultpackage_assets_gameres_material.bundle",
|
||||
"UnityCRC": 0,
|
||||
"FileHash": "a8287dfe576c96ccf92a3c86741d2f0a",
|
||||
"FileCRC": "00000000",
|
||||
"FileSize": 2278,
|
||||
"Encrypted": false,
|
||||
"Tags": [],
|
||||
"DependIDs": []
|
||||
},
|
||||
{
|
||||
"BundleName": "defaultpackage_assets_gameres_prefabs_role.bundle",
|
||||
"UnityCRC": 0,
|
||||
"FileHash": "cb418ab553275053fdb883ca6f191739",
|
||||
"FileCRC": "00000000",
|
||||
"FileSize": 15352,
|
||||
"Encrypted": false,
|
||||
"Tags": [],
|
||||
"DependIDs": []
|
||||
},
|
||||
{
|
||||
"BundleName": "defaultpackage_assets_gameres_prefabs_room.bundle",
|
||||
"UnityCRC": 0,
|
||||
"FileHash": "f13e74e73c92f19dc1de1fe47f2615a1",
|
||||
"FileCRC": "00000000",
|
||||
"FileSize": 114685,
|
||||
"Encrypted": false,
|
||||
"Tags": [],
|
||||
"DependIDs": []
|
||||
},
|
||||
{
|
||||
"BundleName": "defaultpackage_assets_gameres_prefabs_ui.bundle",
|
||||
"UnityCRC": 0,
|
||||
"FileHash": "9d6279d2e4e3a110f484edeaf483e587",
|
||||
"FileCRC": "00000000",
|
||||
"FileSize": 432850,
|
||||
"Encrypted": false,
|
||||
"Tags": [],
|
||||
"DependIDs": []
|
||||
},
|
||||
{
|
||||
"BundleName": "defaultpackage_assets_gameres_prefabs_ui_item.bundle",
|
||||
"UnityCRC": 0,
|
||||
"FileHash": "e7e0805bc12651e2c9dbe6d6b80d9057",
|
||||
"FileCRC": "00000000",
|
||||
"FileSize": 65067,
|
||||
"Encrypted": false,
|
||||
"Tags": [],
|
||||
"DependIDs": []
|
||||
},
|
||||
{
|
||||
"BundleName": "defaultpackage_assets_gameres_scene.bundle",
|
||||
"UnityCRC": 0,
|
||||
"FileHash": "c786bd7e64ca86dfe1651ea288991246",
|
||||
"FileCRC": "00000000",
|
||||
"FileSize": 205195,
|
||||
"Encrypted": false,
|
||||
"Tags": [],
|
||||
"DependIDs": []
|
||||
},
|
||||
{
|
||||
"BundleName": "defaultpackage_assets_gameres_config.bundle",
|
||||
"UnityCRC": 0,
|
||||
"FileHash": "2f7bf7103106f09fb52324149fe1126e",
|
||||
"FileCRC": "00000000",
|
||||
"FileSize": 2156,
|
||||
"Encrypted": false,
|
||||
"Tags": [],
|
||||
"DependIDs": []
|
||||
}
|
||||
]
|
||||
}
|
Loading…
Reference in New Issue