diff --git a/Src/Buff.meta b/Src/Buff.meta new file mode 100644 index 0000000..ab5f27f --- /dev/null +++ b/Src/Buff.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 69df15755a72ed44c9d7a0112f34ce9f +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Src/Buff/IBuff.cs b/Src/Buff/IBuff.cs new file mode 100644 index 0000000..1117081 --- /dev/null +++ b/Src/Buff/IBuff.cs @@ -0,0 +1,39 @@ +using System; +using System.Collections; +using System.Collections.Generic; +using BITKit; + +namespace Net.Project.B.Buff +{ + public interface IBuff + { + float Value { get; set; } + } + [Serializable] + public struct AddHp : IBuff + { + public float Value { get; set; } + } + [Serializable] + public struct InfiniteAp : IBuff + { + public float Value { get; set; } + } + + [Serializable] + public struct Hunger : IBuff + { + public float Value { get; set; } + } + + [Serializable] + public struct Thirsty : IBuff + { + public float Value { get; set; } + } + [Serializable] + public struct Bleeding:IBuff + { + public float Value { get; set; } + } +} diff --git a/Src/Buff/IBuff.cs.meta b/Src/Buff/IBuff.cs.meta new file mode 100644 index 0000000..4b0d2a6 --- /dev/null +++ b/Src/Buff/IBuff.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 0e2b4f90e2e2d174094c68bf35656160 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Src/Buff/IBuffComponent.cs b/Src/Buff/IBuffComponent.cs new file mode 100644 index 0000000..b43ca14 --- /dev/null +++ b/Src/Buff/IBuffComponent.cs @@ -0,0 +1,93 @@ +using System; +using System.Buffers; +using System.Collections.Generic; + +namespace Net.Project.B.Buff +{ + public interface IBuffComponent + { + Memory Buffs { get; } + IReadOnlyDictionary Durations { get; } + public event Action OnBuffAdded; + public event Action OnBuffUpdated; + public event Action OnBuffRemoved; + + public void AddBuff(IBuff buff = default, float duration = 0); + public void RemoveBuff() where T : IBuff; + public void RemoveBuff(ref IBuff buff); + } + + public class BuffComponent:IBuffComponent + { + private readonly ArrayPool _pool=ArrayPool.Create(); + public Memory Buffs=>_buff.AsMemory(0, _count); + public IReadOnlyDictionary Durations => _durations; + private readonly IBuff[] _buff = new IBuff[32]; + public event Action OnBuffAdded; + public event Action OnBuffUpdated; + public event Action OnBuffRemoved; + + private readonly Dictionary _durations = new(); + + private readonly Queue _removeQueue = new(); + + private int _count; + + public void AddBuff(IBuff buff, float duration = 0) + { + _buff[_count++] = buff; + OnBuffAdded?.Invoke(buff); + if (duration > 0) + { + if (_durations.TryGetValue(buff, out var currentDuration)) + { + currentDuration += duration; + } + else + { + currentDuration = duration; + } + _durations[buff] = currentDuration; + } + } + + public void RemoveBuff() where T : IBuff + { + for (var index = 0; index < Buffs.Span.Length; index++) + { + ref var buff =ref Buffs.Span[index]; + if (buff is T) + { + _removeQueue.Enqueue(buff); + } + } + while (_removeQueue.TryDequeue(out var remove)) + { + RemoveBuff(ref remove); + } + } + + public void RemoveBuff(ref IBuff buff) + { + var prev = false; + for (var i = 0; i < _count; i++) + { + ref var b = ref _buff[i]; + if (b == buff) + { + prev = true; + + continue; + } + if (!prev) continue; + ref var p = ref _buff[i - 1]; + p = b; + } + if (prev) + { + OnBuffRemoved?.Invoke(buff); + } + _count--; + } + } +} diff --git a/Src/Buff/IBuffComponent.cs.meta b/Src/Buff/IBuffComponent.cs.meta new file mode 100644 index 0000000..c99b07e --- /dev/null +++ b/Src/Buff/IBuffComponent.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: ab511dc98184e9641b6aac16c6da1c10 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Src/Buff/Net.Project.B.Buff.asmdef b/Src/Buff/Net.Project.B.Buff.asmdef new file mode 100644 index 0000000..df79ebb --- /dev/null +++ b/Src/Buff/Net.Project.B.Buff.asmdef @@ -0,0 +1,19 @@ +{ + "name": "Net.Project.B.Buff", + "rootNamespace": "", + "references": [ + "GUID:14fe60d984bf9f84eac55c6ea033a8f4", + "GUID:d8b63aba1907145bea998dd612889d6b", + "GUID:f51ebe6a0ceec4240a699833d6309b23", + "GUID:677cd05ca06c46b4395470200b1acdad" + ], + "includePlatforms": [], + "excludePlatforms": [], + "allowUnsafeCode": true, + "overrideReferences": false, + "precompiledReferences": [], + "autoReferenced": true, + "defineConstraints": [], + "versionDefines": [], + "noEngineReferences": true +} \ No newline at end of file diff --git a/Src/Buff/Net.Project.B.Buff.asmdef.meta b/Src/Buff/Net.Project.B.Buff.asmdef.meta new file mode 100644 index 0000000..299edf6 --- /dev/null +++ b/Src/Buff/Net.Project.B.Buff.asmdef.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 46b59e80b22f9f04dbd080f812276bc4 +AssemblyDefinitionImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Src/GameService/IGameMapData.cs b/Src/GameService/IGameMapData.cs index 23a9e58..e9cbd97 100644 --- a/Src/GameService/IGameMapData.cs +++ b/Src/GameService/IGameMapData.cs @@ -8,7 +8,8 @@ namespace Project.B.Map public string MapName { get; } public string Author { get; } public string Description { get; } - public object Overview { get; } + public object MapOverview { get; } + public object LoadingScreen { get; } public string MapAddress { get; } } } diff --git a/Src/GameService/IGameMapService.cs b/Src/GameService/IGameMapService.cs index ea24c24..e9dd389 100644 --- a/Src/GameService/IGameMapService.cs +++ b/Src/GameService/IGameMapService.cs @@ -39,20 +39,21 @@ namespace Project.B.Map /// /// 当加载状态发生变化时 /// - event Action OnTaskStatusChanged; + event Action OnTaskStatusChanged; + /// /// 切换场景前 /// + event Func OnMapChange; + /// + /// 切换场景时 + /// event Func OnMapChanging; /// /// 切换场景后 /// event Action OnMapChanged; - /// - /// 切换场景后,加载完成 - /// - event Action OnMapChangeCompleted; /// /// 地图加载进度 /// diff --git a/Src/GameService/ScriptableGameMapData.cs b/Src/GameService/ScriptableGameMapData.cs index c5a4ee1..a41b7be 100644 --- a/Src/GameService/ScriptableGameMapData.cs +++ b/Src/GameService/ScriptableGameMapData.cs @@ -2,6 +2,7 @@ using System.Collections; using System.Collections.Generic; using UnityEngine; +using UnityEngine.Serialization; namespace Project.B.Map { @@ -11,16 +12,18 @@ namespace Project.B.Map [SerializeField] private string description; [SerializeField] private string author; [SerializeField] private string mapAddress; - [SerializeField] private Texture overview; + [FormerlySerializedAs("overview")] [SerializeField] private Texture loadingScreen; + [SerializeField] private Sprite mapOverview; [SerializeField] private Vector2 offset; [SerializeField] private int size; public string MapName => mapName; public string Author => author; public string Description => description; - public object Overview => overview; + public object LoadingScreen => loadingScreen; public string MapAddress => mapAddress; public Vector2 Offset => offset; public int Size => size; + public object MapOverview => mapOverview; } } #endif \ No newline at end of file diff --git a/Src/Health/KnockedService.cs b/Src/Health/KnockedService.cs index c2fcd56..6a69279 100644 --- a/Src/Health/KnockedService.cs +++ b/Src/Health/KnockedService.cs @@ -82,7 +82,7 @@ namespace Net.Project.B.Health _knocked.Add(id); _onKnocked?.Invoke(id, true); // _logger.LogInformation($"Entity {id} 被击倒了"); - return 0; + return oldHp-1; } private void OnHealthChanged(int arg1, int arg2, int arg3, object arg4) diff --git a/Src/Interaction/IWorldInteractionService.cs b/Src/Interaction/IWorldInteractionService.cs index 12b9f35..96c6f68 100644 --- a/Src/Interaction/IWorldInteractionService.cs +++ b/Src/Interaction/IWorldInteractionService.cs @@ -14,6 +14,7 @@ namespace Net.Project.B.Interaction Hold, Performed, System, + Cancel, } /// /// 可互动类型 @@ -22,6 +23,7 @@ namespace Net.Project.B.Interaction { public IWorldInteractionType InteractionType { get; } public object WorldObject { get; set; } + public int Id { get; set; } } /// /// 世界互动服务 diff --git a/Src/Interaction/WorldInteractable.cs b/Src/Interaction/WorldInteractable.cs index aabccd7..b3eff72 100644 --- a/Src/Interaction/WorldInteractable.cs +++ b/Src/Interaction/WorldInteractable.cs @@ -10,18 +10,9 @@ namespace Net.Project.B.Interaction [Serializable] public class WorldInteractable : IWorldInteractable,IWorldNode { - public GameObject gameObject; - public IWorldInteractable Root => this; public IWorldInteractionType InteractionType => null; - - public object WorldObject - { - get => gameObject; - set - { - if (value is GameObject go) gameObject = go; - } - } + public object WorldObject { get; set; } + public int Id { get; set; } } } #endif diff --git a/Src/Inventory/IPlayerInventory.cs b/Src/Inventory/IPlayerInventory.cs index 2a581f1..55094d6 100644 --- a/Src/Inventory/IPlayerInventory.cs +++ b/Src/Inventory/IPlayerInventory.cs @@ -11,6 +11,7 @@ namespace Net.Project.B.Inventory /// public interface IPlayerInventory { + int Size { get; } /// /// 背包 /// @@ -31,6 +32,11 @@ namespace Net.Project.B.Inventory /// event Action OnUsedItem; + event Func ConsumeFactory; + + event Action OnConsumedItem; + void UseItem(int id); + void ConsumeItem(int id); } } diff --git a/Src/Mark/MarkComponent.cs b/Src/Mark/MarkComponent.cs index fedfbc0..d461840 100644 --- a/Src/Mark/MarkComponent.cs +++ b/Src/Mark/MarkComponent.cs @@ -9,7 +9,6 @@ namespace Net.Project.B.Mark public interface IMarkType{} public interface IMarkComponent { - public float3 Position { get; } - public IMarkType MarkType { get; } } + public class PositionMark:IMarkComponent{} } diff --git a/Src/Mark/MarkNodes.cs b/Src/Mark/MarkNodes.cs new file mode 100644 index 0000000..948beb8 --- /dev/null +++ b/Src/Mark/MarkNodes.cs @@ -0,0 +1,68 @@ +using System; +using System.Collections; +using System.Collections.Generic; +using System.Security; +using BITKit.WorldNode; +#if UNITY_5_3_OR_NEWER +using BITKit; +using UnityEngine; + +namespace Net.Project.B.Mark +{ + [Serializable] + public class LandMark:IWorldNode + { + [SerializeField] private string name; + [SerializeReference,SubclassSelector] private IReference iconName; + public string Name => name; + public string IconName => iconName?.Value; + } + + public enum DefaultLandMarks + { + None, + + // Medical + Hospital, + Clinic, + Pharmacy, + EmergencyRoom, + + // Education + School, + University, + Kindergarten, + Library, + + // Transportation + SubwayStation, + BusStation, + TrainStation, + TaxiStand, + + // Government & Public + PoliceStation, + FireStation, + CityHall, + PostOffice, + + // Commercial + Supermarket, + Mall, + ConvenienceStore, + GasStation, + + // Residential + ApartmentBuilding, + SuburbanHouse, + ParkingLot, + Park + } + [Serializable] + public struct DefaultLandMark : IReference + { + public DefaultLandMarks landMarks; + public string Get() => landMarks.ToString(); + } +} +#endif diff --git a/Src/Mark/MarkNodes.cs.meta b/Src/Mark/MarkNodes.cs.meta new file mode 100644 index 0000000..69e5c11 --- /dev/null +++ b/Src/Mark/MarkNodes.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: f992ed7e9494ef64aa99ad6521786b29 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Src/Mark/MarkService.cs b/Src/Mark/MarkService.cs index 03566af..23a5275 100644 --- a/Src/Mark/MarkService.cs +++ b/Src/Mark/MarkService.cs @@ -9,7 +9,7 @@ namespace Net.Project.B.Mark void Mark(int id); void CancelMark(int id); public event Action OnMark; - IReadOnlyCollection InMarking { get; } + HashSet InMarking { get; } } } diff --git a/Src/Mark/Net.Project.B.Mark.asmdef b/Src/Mark/Net.Project.B.Mark.asmdef index 2f026ba..8174206 100644 --- a/Src/Mark/Net.Project.B.Mark.asmdef +++ b/Src/Mark/Net.Project.B.Mark.asmdef @@ -4,7 +4,8 @@ "references": [ "GUID:d8b63aba1907145bea998dd612889d6b", "GUID:14fe60d984bf9f84eac55c6ea033a8f4", - "GUID:d750d221812bb1d48baff92e6ef73e28" + "GUID:d750d221812bb1d48baff92e6ef73e28", + "GUID:49b49c76ee64f6b41bf28ef951cb0e50" ], "includePlatforms": [], "excludePlatforms": [], diff --git a/Src/Medicine.meta b/Src/Medicine.meta new file mode 100644 index 0000000..6793ab4 --- /dev/null +++ b/Src/Medicine.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 2b660864b23a7b94cb89704f2410bfa4 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Src/PDA.meta b/Src/PDA.meta new file mode 100644 index 0000000..cd9bdda --- /dev/null +++ b/Src/PDA.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 17d5fda04bd430845b1a483774254603 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Src/PDA/IPDAService.cs b/Src/PDA/IPDAService.cs new file mode 100644 index 0000000..609603a --- /dev/null +++ b/Src/PDA/IPDAService.cs @@ -0,0 +1,23 @@ +using System; +using System.Collections; +using System.Collections.Generic; +using BITKit; +using BITKit.StateMachine; +using Cysharp.Threading.Tasks; + +// ReSharper disable InconsistentNaming + +namespace Net.Project.B.PDA +{ + public interface IPDAService + { + UniTask Navigate(string url); + UniTask Home(); + UniTask Back(); + void Badge(string packageName); + public event Action OnNavigated; + public event Func OnNavigatedAsync; + event Action OnNotification; + void Notify(string message); + } +} diff --git a/Src/PDA/IPDAService.cs.meta b/Src/PDA/IPDAService.cs.meta new file mode 100644 index 0000000..b935eeb --- /dev/null +++ b/Src/PDA/IPDAService.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: fa5cfb924bf3fb14e866ab573843cdb8 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Src/SpotterScope/Net.Project.B.SpotterScope.asmdef b/Src/PDA/Net.Project.B.PDA.asmdef similarity index 91% rename from Src/SpotterScope/Net.Project.B.SpotterScope.asmdef rename to Src/PDA/Net.Project.B.PDA.asmdef index df30932..1e3f2d8 100644 --- a/Src/SpotterScope/Net.Project.B.SpotterScope.asmdef +++ b/Src/PDA/Net.Project.B.PDA.asmdef @@ -1,5 +1,5 @@ { - "name": "Net.Project.B.SpotterScope", + "name": "Net.Project.B.PDA", "rootNamespace": "", "references": [ "GUID:14fe60d984bf9f84eac55c6ea033a8f4", diff --git a/Src/PDA/Net.Project.B.PDA.asmdef.meta b/Src/PDA/Net.Project.B.PDA.asmdef.meta new file mode 100644 index 0000000..975660c --- /dev/null +++ b/Src/PDA/Net.Project.B.PDA.asmdef.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 85dbd64adec129a49b024066ca126ecc +AssemblyDefinitionImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Src/PDA/PDAApps.cs b/Src/PDA/PDAApps.cs new file mode 100644 index 0000000..93826a4 --- /dev/null +++ b/Src/PDA/PDAApps.cs @@ -0,0 +1,48 @@ +using System; +using System.Collections; +using System.Collections.Generic; +using BITKit.StateMachine; +using Cysharp.Threading.Tasks; + +namespace Net.Project.B.PDA +{ + public interface IApp + { + public string PackageName { get; } + public string AppName { get; } + } + + public interface IAppClass:IStateAsync + { + public Type AppType { get; } + public IReadOnlyList Routes { get; } + public UniTask GetPage(string route); + } + + public interface IAppClass : IAppClass + { + + } +} + +namespace Net.Project.B.PDA.App +{ + [Serializable] + public struct Phone:IApp + { + public string PackageName => "com.bndroid.phone"; + public string AppName => "拨号"; + } + [Serializable] + public struct Map:IApp + { + public string PackageName => "com.bndroid.map"; + public string AppName => "地图"; + } + [Serializable] + public struct Quest:IApp + { + public string PackageName => "com.bndroid.quest"; + public string AppName => "人物"; + } +} diff --git a/Src/PDA/PDAApps.cs.meta b/Src/PDA/PDAApps.cs.meta new file mode 100644 index 0000000..bb8c414 --- /dev/null +++ b/Src/PDA/PDAApps.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 39d2adb73a5e7254d9d56daf3ca3e9a2 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Src/Quest/Net.Project.B.Quest.asmdef b/Src/Quest/Net.Project.B.Quest.asmdef index d600cbf..0fcf0a8 100644 --- a/Src/Quest/Net.Project.B.Quest.asmdef +++ b/Src/Quest/Net.Project.B.Quest.asmdef @@ -2,7 +2,8 @@ "name": "Net.Project.B.Quest", "rootNamespace": "", "references": [ - "GUID:14fe60d984bf9f84eac55c6ea033a8f4" + "GUID:14fe60d984bf9f84eac55c6ea033a8f4", + "GUID:d750d221812bb1d48baff92e6ef73e28" ], "includePlatforms": [], "excludePlatforms": [], diff --git a/Src/Quest/QuestNode.cs b/Src/Quest/QuestNode.cs new file mode 100644 index 0000000..6e7a251 --- /dev/null +++ b/Src/Quest/QuestNode.cs @@ -0,0 +1,14 @@ +using System; +using System.Collections; +using System.Collections.Generic; +using BITKit.WorldNode; + +namespace Net.Project.B.Quest +{ + public interface IQuestNode :IWorldNode + { + + } + + +} diff --git a/Src/Quest/QuestNode.cs.meta b/Src/Quest/QuestNode.cs.meta new file mode 100644 index 0000000..3595ef9 --- /dev/null +++ b/Src/Quest/QuestNode.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 4278a7c2eaeebf54192a2349ccd09e32 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Src/SpotterScope/ISpotterScopeService.cs b/Src/SpotterScope/ISnapshotService.cs similarity index 64% rename from Src/SpotterScope/ISpotterScopeService.cs rename to Src/SpotterScope/ISnapshotService.cs index 169d592..7ecfb01 100644 --- a/Src/SpotterScope/ISpotterScopeService.cs +++ b/Src/SpotterScope/ISnapshotService.cs @@ -8,7 +8,7 @@ using Unity.Mathematics; namespace Net.Project.B.World { [MemoryPackable] - public partial record SpotterScopeData + public partial record SnapshotData { public string FileName { get; set; } public string Name { get; set; } @@ -17,12 +17,12 @@ namespace Net.Project.B.World public float3 Position { get; set; } public quaternion Rotation { get; set; } } - public interface ISpotterScopeService + public interface ISnapshotService { public string Directory { get; } - public UniTask Snapshot(float3 position, quaternion rotation, int fov); - UniTask> GetSnapshots(); - public event Action OnSnapshot; + public UniTask Snapshot(float3 position, quaternion rotation, int fov); + UniTask> GetSnapshots(); + public event Action OnSnapshot; } } diff --git a/Src/SpotterScope/ISpotterScopeService.cs.meta b/Src/SpotterScope/ISnapshotService.cs.meta similarity index 100% rename from Src/SpotterScope/ISpotterScopeService.cs.meta rename to Src/SpotterScope/ISnapshotService.cs.meta diff --git a/Src/SpotterScope/Net.Project.B.Snapshot.asmdef b/Src/SpotterScope/Net.Project.B.Snapshot.asmdef new file mode 100644 index 0000000..e60ec42 --- /dev/null +++ b/Src/SpotterScope/Net.Project.B.Snapshot.asmdef @@ -0,0 +1,18 @@ +{ + "name": "Net.Project.B.Snapshot", + "rootNamespace": "", + "references": [ + "GUID:14fe60d984bf9f84eac55c6ea033a8f4", + "GUID:d8b63aba1907145bea998dd612889d6b", + "GUID:f51ebe6a0ceec4240a699833d6309b23" + ], + "includePlatforms": [], + "excludePlatforms": [], + "allowUnsafeCode": false, + "overrideReferences": false, + "precompiledReferences": [], + "autoReferenced": true, + "defineConstraints": [], + "versionDefines": [], + "noEngineReferences": true +} \ No newline at end of file diff --git a/Src/SpotterScope/Net.Project.B.SpotterScope.asmdef.meta b/Src/SpotterScope/Net.Project.B.Snapshot.asmdef.meta similarity index 100% rename from Src/SpotterScope/Net.Project.B.SpotterScope.asmdef.meta rename to Src/SpotterScope/Net.Project.B.Snapshot.asmdef.meta diff --git a/Src/Survival.meta b/Src/Survival.meta new file mode 100644 index 0000000..8baa869 --- /dev/null +++ b/Src/Survival.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 5147f3463bd84e447a217effbd935234 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Src/Survival/Net.Project.B.Survival.asmdef b/Src/Survival/Net.Project.B.Survival.asmdef new file mode 100644 index 0000000..7a6da72 --- /dev/null +++ b/Src/Survival/Net.Project.B.Survival.asmdef @@ -0,0 +1,17 @@ +{ + "name": "Net.Project.B.Survival", + "rootNamespace": "", + "references": [ + "GUID:14fe60d984bf9f84eac55c6ea033a8f4", + "GUID:677cd05ca06c46b4395470200b1acdad" + ], + "includePlatforms": [], + "excludePlatforms": [], + "allowUnsafeCode": false, + "overrideReferences": false, + "precompiledReferences": [], + "autoReferenced": true, + "defineConstraints": [], + "versionDefines": [], + "noEngineReferences": true +} \ No newline at end of file diff --git a/Src/Survival/Net.Project.B.Survival.asmdef.meta b/Src/Survival/Net.Project.B.Survival.asmdef.meta new file mode 100644 index 0000000..253f701 --- /dev/null +++ b/Src/Survival/Net.Project.B.Survival.asmdef.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: a11a23d94d62c8b469f6b2542e489fc7 +AssemblyDefinitionImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Src/Survival/SurvivalProperties.cs b/Src/Survival/SurvivalProperties.cs new file mode 100644 index 0000000..8f65465 --- /dev/null +++ b/Src/Survival/SurvivalProperties.cs @@ -0,0 +1,25 @@ +using System; +using System.Collections; +using System.Collections.Generic; +using BITKit; + +namespace Net.Project.B.Survival +{ + [Serializable] + public struct AddHp : IScriptableItemProperty + { + public int value; + } + + [Serializable] + public struct AddHunger : IScriptableItemProperty + { + public int value; + } + + [Serializable] + public struct AddThirsty : IScriptableItemProperty + { + public int value; + } +} diff --git a/Src/Survival/SurvivalProperties.cs.meta b/Src/Survival/SurvivalProperties.cs.meta new file mode 100644 index 0000000..92b5b82 --- /dev/null +++ b/Src/Survival/SurvivalProperties.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: b3ed4589893641d41af890c80dd6b306 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Src/UX/Net.Project.B.UX.asmdef b/Src/UX/Net.Project.B.UX.asmdef index faeac56..3694780 100644 --- a/Src/UX/Net.Project.B.UX.asmdef +++ b/Src/UX/Net.Project.B.UX.asmdef @@ -5,7 +5,8 @@ "GUID:14fe60d984bf9f84eac55c6ea033a8f4", "GUID:f51ebe6a0ceec4240a699833d6309b23", "GUID:677cd05ca06c46b4395470200b1acdad", - "GUID:5087931ed5612e84ca166071da8e35a4" + "GUID:5087931ed5612e84ca166071da8e35a4", + "GUID:46b59e80b22f9f04dbd080f812276bc4" ], "includePlatforms": [], "excludePlatforms": [], diff --git a/Src/UX/UXDefine.cs b/Src/UX/UXDefine.cs index e09d80a..a4a7a2f 100644 --- a/Src/UX/UXDefine.cs +++ b/Src/UX/UXDefine.cs @@ -4,6 +4,7 @@ using System.Collections.Generic; using BITKit; using BITKit.UX; using Microsoft.Extensions.Logging; +using Net.Project.B.Buff; using Net.Project.B.World; namespace Net.Project.B.UX @@ -39,11 +40,17 @@ namespace Net.Project.B.UX public interface IUXMapSelector:IUXPanel{} public interface IUXSnapshotWindow:IUXPanel { - void Open(SpotterScopeData scopeData); + void Open(SnapshotData scopeData); } public interface IUXSnapshot:IUXPanel{} public interface IUXInventorySwap:IUXPanel{} public interface IUXMap:IUXPanel{} public interface IUXIndicator:IUXPanel{} public interface IUXMark:IUXPanel{} + public interface IUXQuest:IUXPanel{} + + public interface IUXSurvival : IUXPanel + { + public IReadOnlyCollection SurvivalBuffs { get; set; } + } } diff --git a/Src/WorldNode/UnityElevatorNode.cs b/Src/WorldNode/UnityElevatorNode.cs index fcf0f42..137013d 100644 --- a/Src/WorldNode/UnityElevatorNode.cs +++ b/Src/WorldNode/UnityElevatorNode.cs @@ -16,15 +16,11 @@ namespace Net.Project.B.WorldNode [SerializeField] private GameObject[] floors; [SerializeField] private GameObject[] floorButtons; [SerializeField] private Rigidbody platform; + [SerializeField] private GameObject elevatorButton; public Rigidbody Platform => platform; - public readonly Dictionary Floors = new(); - public void Initialize() - { - for (var index = 0; index < floors.Length; index++) - { - var floor = floors[index]; - } - } + public GameObject[] Floors => floors; + public GameObject[] FloorButtons => floorButtons; + public GameObject ElevatorButton => elevatorButton; #endif } diff --git a/Src/WorldNode/UnityEvacuateNode.cs b/Src/WorldNode/UnityEvacuateNode.cs new file mode 100644 index 0000000..61d86ce --- /dev/null +++ b/Src/WorldNode/UnityEvacuateNode.cs @@ -0,0 +1,29 @@ +using System; +using System.Collections; +using System.Collections.Generic; +using BITKit.WorldNode; + +#if UNITY_5_3_OR_NEWER + +using UnityEngine; +using UnityEngine.Serialization; + +namespace Net.Project.B.WorldNode +{ + public interface IEvacuateType{} + + [Serializable] + public struct HelicopterEvacuate:IEvacuateType + { + public int time; + } + + [Serializable] + public class UnityEvacuateNode :IWorldNode + { + [SerializeReference, SubclassSelector] private IEvacuateType evacuateType; + + public IEvacuateType EvacuateType => evacuateType; + } +} +#endif \ No newline at end of file diff --git a/Src/WorldNode/UnityEvacuateNode.cs.meta b/Src/WorldNode/UnityEvacuateNode.cs.meta new file mode 100644 index 0000000..255e866 --- /dev/null +++ b/Src/WorldNode/UnityEvacuateNode.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 5a24ba0c7610fe14eb6cfb6c9e2695c1 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Src/WorldNode/UnitySubwayNode.cs b/Src/WorldNode/UnitySubwayNode.cs new file mode 100644 index 0000000..88df407 --- /dev/null +++ b/Src/WorldNode/UnitySubwayNode.cs @@ -0,0 +1,23 @@ +#if UNITY_5_3_OR_NEWER +using System; +using System.Collections; +using System.Collections.Generic; +using BITKit.WorldNode; +using UnityEngine; + +namespace Net.Project.B.WorldNode +{ + [Serializable] + public class UnitySubwayNode:IWorldNode + { + [SerializeField] private Rigidbody subway; + [SerializeField] private float speed; + [SerializeField] private Transform spline; + [SerializeField] private Vector3 offset; + public Rigidbody Subway => subway; + public float Speed => speed; + public Transform Spline => spline; + public Vector3 Offset => offset; + } +} +#endif \ No newline at end of file diff --git a/Src/WorldNode/UnitySubwayNode.cs.meta b/Src/WorldNode/UnitySubwayNode.cs.meta new file mode 100644 index 0000000..f1f463a --- /dev/null +++ b/Src/WorldNode/UnitySubwayNode.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 66a03ae86cb349b40808fecc8eb0f2bf +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Src/WorldNode/UnitySubwayPathNode.cs b/Src/WorldNode/UnitySubwayPathNode.cs new file mode 100644 index 0000000..aa4fa5b --- /dev/null +++ b/Src/WorldNode/UnitySubwayPathNode.cs @@ -0,0 +1,20 @@ +using System; +using System.Collections; +using System.Collections.Generic; +using BITKit.WorldNode; + +#if UNITY_5_3_OR_NEWER +using UnityEngine; + +namespace Net.Project.B.WorldNode +{ + + [Serializable] + public class UnitySubwayPathNode : IWorldNode + { + [SerializeField] private Transform[] platforms; + public Transform[] Platforms => platforms; + } + +} +#endif \ No newline at end of file diff --git a/Src/WorldNode/UnitySubwayPathNode.cs.meta b/Src/WorldNode/UnitySubwayPathNode.cs.meta new file mode 100644 index 0000000..d281be8 --- /dev/null +++ b/Src/WorldNode/UnitySubwayPathNode.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 6414561ed7da36540a4c9d429cced3eb +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Src/WorldNode/UnitySubwayPlatformNode.cs b/Src/WorldNode/UnitySubwayPlatformNode.cs new file mode 100644 index 0000000..0bdeed6 --- /dev/null +++ b/Src/WorldNode/UnitySubwayPlatformNode.cs @@ -0,0 +1,23 @@ +using System; +using System.Collections; +using System.Collections.Generic; +using BITKit.WorldNode; + +#if UNITY_5_3_OR_NEWER +using UnityEngine; + +namespace Net.Project.B +{ + + [Serializable] + public class UnitySubwayPlatformNode : IWorldNode + { + [SerializeField] private int stopTime; + + public int StopTime => stopTime; + } + +} + + +#endif \ No newline at end of file diff --git a/Src/WorldNode/UnitySubwayPlatformNode.cs.meta b/Src/WorldNode/UnitySubwayPlatformNode.cs.meta new file mode 100644 index 0000000..e17932c --- /dev/null +++ b/Src/WorldNode/UnitySubwayPlatformNode.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 58b9d89a09f75ac44a079ecbb6d8b9b2 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: