This commit is contained in:
parent
5fceb6f885
commit
3f9d9f19ce
|
@ -0,0 +1,8 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 69df15755a72ed44c9d7a0112f34ce9f
|
||||||
|
folderAsset: yes
|
||||||
|
DefaultImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
|
@ -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; }
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,11 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 0e2b4f90e2e2d174094c68bf35656160
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
|
@ -0,0 +1,93 @@
|
||||||
|
using System;
|
||||||
|
using System.Buffers;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
|
||||||
|
namespace Net.Project.B.Buff
|
||||||
|
{
|
||||||
|
public interface IBuffComponent
|
||||||
|
{
|
||||||
|
Memory<IBuff> Buffs { get; }
|
||||||
|
IReadOnlyDictionary<IBuff, float> Durations { get; }
|
||||||
|
public event Action<IBuff> OnBuffAdded;
|
||||||
|
public event Action<IBuff, float> OnBuffUpdated;
|
||||||
|
public event Action<IBuff> OnBuffRemoved;
|
||||||
|
|
||||||
|
public void AddBuff(IBuff buff = default, float duration = 0);
|
||||||
|
public void RemoveBuff<T>() where T : IBuff;
|
||||||
|
public void RemoveBuff(ref IBuff buff);
|
||||||
|
}
|
||||||
|
|
||||||
|
public class BuffComponent:IBuffComponent
|
||||||
|
{
|
||||||
|
private readonly ArrayPool<int> _pool=ArrayPool<int>.Create();
|
||||||
|
public Memory<IBuff> Buffs=>_buff.AsMemory(0, _count);
|
||||||
|
public IReadOnlyDictionary<IBuff, float> Durations => _durations;
|
||||||
|
private readonly IBuff[] _buff = new IBuff[32];
|
||||||
|
public event Action<IBuff> OnBuffAdded;
|
||||||
|
public event Action<IBuff, float> OnBuffUpdated;
|
||||||
|
public event Action<IBuff> OnBuffRemoved;
|
||||||
|
|
||||||
|
private readonly Dictionary<IBuff, float> _durations = new();
|
||||||
|
|
||||||
|
private readonly Queue<IBuff> _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<T>() 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--;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,11 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: ab511dc98184e9641b6aac16c6da1c10
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
|
@ -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
|
||||||
|
}
|
|
@ -0,0 +1,7 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 46b59e80b22f9f04dbd080f812276bc4
|
||||||
|
AssemblyDefinitionImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
|
@ -8,7 +8,8 @@ namespace Project.B.Map
|
||||||
public string MapName { get; }
|
public string MapName { get; }
|
||||||
public string Author { get; }
|
public string Author { get; }
|
||||||
public string Description { get; }
|
public string Description { get; }
|
||||||
public object Overview { get; }
|
public object MapOverview { get; }
|
||||||
|
public object LoadingScreen { get; }
|
||||||
public string MapAddress { get; }
|
public string MapAddress { get; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -39,20 +39,21 @@ namespace Project.B.Map
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 当加载状态发生变化时
|
/// 当加载状态发生变化时
|
||||||
/// </summary>
|
/// </summary>
|
||||||
event Action<TaskStatus,TaskStatus> OnTaskStatusChanged;
|
event Action<TaskStatus,TaskStatus> OnTaskStatusChanged;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 切换场景前
|
/// 切换场景前
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
event Func<string, UniTask> OnMapChange;
|
||||||
|
/// <summary>
|
||||||
|
/// 切换场景时
|
||||||
|
/// </summary>
|
||||||
event Func<string, UniTask> OnMapChanging;
|
event Func<string, UniTask> OnMapChanging;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 切换场景后
|
/// 切换场景后
|
||||||
/// </summary>
|
/// </summary>
|
||||||
event Action<Guid,string> OnMapChanged;
|
event Action<Guid,string> OnMapChanged;
|
||||||
/// <summary>
|
|
||||||
/// 切换场景后,加载完成
|
|
||||||
/// </summary>
|
|
||||||
event Action<Guid,string> OnMapChangeCompleted;
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 地图加载进度
|
/// 地图加载进度
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
using UnityEngine.Serialization;
|
||||||
|
|
||||||
namespace Project.B.Map
|
namespace Project.B.Map
|
||||||
{
|
{
|
||||||
|
@ -11,16 +12,18 @@ namespace Project.B.Map
|
||||||
[SerializeField] private string description;
|
[SerializeField] private string description;
|
||||||
[SerializeField] private string author;
|
[SerializeField] private string author;
|
||||||
[SerializeField] private string mapAddress;
|
[SerializeField] private string mapAddress;
|
||||||
[SerializeField] private Texture overview;
|
[FormerlySerializedAs("overview")] [SerializeField] private Texture loadingScreen;
|
||||||
|
[SerializeField] private Sprite mapOverview;
|
||||||
[SerializeField] private Vector2 offset;
|
[SerializeField] private Vector2 offset;
|
||||||
[SerializeField] private int size;
|
[SerializeField] private int size;
|
||||||
public string MapName => mapName;
|
public string MapName => mapName;
|
||||||
public string Author => author;
|
public string Author => author;
|
||||||
public string Description => description;
|
public string Description => description;
|
||||||
public object Overview => overview;
|
public object LoadingScreen => loadingScreen;
|
||||||
public string MapAddress => mapAddress;
|
public string MapAddress => mapAddress;
|
||||||
public Vector2 Offset => offset;
|
public Vector2 Offset => offset;
|
||||||
public int Size => size;
|
public int Size => size;
|
||||||
|
public object MapOverview => mapOverview;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
|
@ -82,7 +82,7 @@ namespace Net.Project.B.Health
|
||||||
_knocked.Add(id);
|
_knocked.Add(id);
|
||||||
_onKnocked?.Invoke(id, true);
|
_onKnocked?.Invoke(id, true);
|
||||||
// _logger.LogInformation($"Entity {id} 被击倒了");
|
// _logger.LogInformation($"Entity {id} 被击倒了");
|
||||||
return 0;
|
return oldHp-1;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void OnHealthChanged(int arg1, int arg2, int arg3, object arg4)
|
private void OnHealthChanged(int arg1, int arg2, int arg3, object arg4)
|
||||||
|
|
|
@ -14,6 +14,7 @@ namespace Net.Project.B.Interaction
|
||||||
Hold,
|
Hold,
|
||||||
Performed,
|
Performed,
|
||||||
System,
|
System,
|
||||||
|
Cancel,
|
||||||
}
|
}
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 可互动类型
|
/// 可互动类型
|
||||||
|
@ -22,6 +23,7 @@ namespace Net.Project.B.Interaction
|
||||||
{
|
{
|
||||||
public IWorldInteractionType InteractionType { get; }
|
public IWorldInteractionType InteractionType { get; }
|
||||||
public object WorldObject { get; set; }
|
public object WorldObject { get; set; }
|
||||||
|
public int Id { get; set; }
|
||||||
}
|
}
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 世界互动服务
|
/// 世界互动服务
|
||||||
|
|
|
@ -10,18 +10,9 @@ namespace Net.Project.B.Interaction
|
||||||
[Serializable]
|
[Serializable]
|
||||||
public class WorldInteractable : IWorldInteractable,IWorldNode
|
public class WorldInteractable : IWorldInteractable,IWorldNode
|
||||||
{
|
{
|
||||||
public GameObject gameObject;
|
|
||||||
public IWorldInteractable Root => this;
|
|
||||||
public IWorldInteractionType InteractionType => null;
|
public IWorldInteractionType InteractionType => null;
|
||||||
|
public object WorldObject { get; set; }
|
||||||
public object WorldObject
|
public int Id { get; set; }
|
||||||
{
|
|
||||||
get => gameObject;
|
|
||||||
set
|
|
||||||
{
|
|
||||||
if (value is GameObject go) gameObject = go;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -11,6 +11,7 @@ namespace Net.Project.B.Inventory
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public interface IPlayerInventory
|
public interface IPlayerInventory
|
||||||
{
|
{
|
||||||
|
int Size { get; }
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 背包
|
/// 背包
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -31,6 +32,11 @@ namespace Net.Project.B.Inventory
|
||||||
/// </summary>
|
/// </summary>
|
||||||
event Action<IRuntimeItem> OnUsedItem;
|
event Action<IRuntimeItem> OnUsedItem;
|
||||||
|
|
||||||
|
event Func<IRuntimeItem,bool> ConsumeFactory;
|
||||||
|
|
||||||
|
event Action<IRuntimeItem> OnConsumedItem;
|
||||||
|
|
||||||
void UseItem(int id);
|
void UseItem(int id);
|
||||||
|
void ConsumeItem(int id);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,7 +9,6 @@ namespace Net.Project.B.Mark
|
||||||
public interface IMarkType{}
|
public interface IMarkType{}
|
||||||
public interface IMarkComponent
|
public interface IMarkComponent
|
||||||
{
|
{
|
||||||
public float3 Position { get; }
|
|
||||||
public IMarkType MarkType { get; }
|
|
||||||
}
|
}
|
||||||
|
public class PositionMark:IMarkComponent{}
|
||||||
}
|
}
|
||||||
|
|
|
@ -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
|
|
@ -0,0 +1,11 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: f992ed7e9494ef64aa99ad6521786b29
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
|
@ -9,7 +9,7 @@ namespace Net.Project.B.Mark
|
||||||
void Mark(int id);
|
void Mark(int id);
|
||||||
void CancelMark(int id);
|
void CancelMark(int id);
|
||||||
public event Action<int, bool> OnMark;
|
public event Action<int, bool> OnMark;
|
||||||
IReadOnlyCollection<int> InMarking { get; }
|
HashSet<int> InMarking { get; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,8 @@
|
||||||
"references": [
|
"references": [
|
||||||
"GUID:d8b63aba1907145bea998dd612889d6b",
|
"GUID:d8b63aba1907145bea998dd612889d6b",
|
||||||
"GUID:14fe60d984bf9f84eac55c6ea033a8f4",
|
"GUID:14fe60d984bf9f84eac55c6ea033a8f4",
|
||||||
"GUID:d750d221812bb1d48baff92e6ef73e28"
|
"GUID:d750d221812bb1d48baff92e6ef73e28",
|
||||||
|
"GUID:49b49c76ee64f6b41bf28ef951cb0e50"
|
||||||
],
|
],
|
||||||
"includePlatforms": [],
|
"includePlatforms": [],
|
||||||
"excludePlatforms": [],
|
"excludePlatforms": [],
|
||||||
|
|
|
@ -0,0 +1,8 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 2b660864b23a7b94cb89704f2410bfa4
|
||||||
|
folderAsset: yes
|
||||||
|
DefaultImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
|
@ -0,0 +1,8 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 17d5fda04bd430845b1a483774254603
|
||||||
|
folderAsset: yes
|
||||||
|
DefaultImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
|
@ -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<string,string> OnNavigated;
|
||||||
|
public event Func<string, string,UniTask> OnNavigatedAsync;
|
||||||
|
event Action<string> OnNotification;
|
||||||
|
void Notify(string message);
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,11 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: fa5cfb924bf3fb14e866ab573843cdb8
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"name": "Net.Project.B.SpotterScope",
|
"name": "Net.Project.B.PDA",
|
||||||
"rootNamespace": "",
|
"rootNamespace": "",
|
||||||
"references": [
|
"references": [
|
||||||
"GUID:14fe60d984bf9f84eac55c6ea033a8f4",
|
"GUID:14fe60d984bf9f84eac55c6ea033a8f4",
|
|
@ -0,0 +1,7 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 85dbd64adec129a49b024066ca126ecc
|
||||||
|
AssemblyDefinitionImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
|
@ -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<string> Routes { get; }
|
||||||
|
public UniTask<object> GetPage(string route);
|
||||||
|
}
|
||||||
|
|
||||||
|
public interface IAppClass<T> : 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 => "人物";
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,11 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 39d2adb73a5e7254d9d56daf3ca3e9a2
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
|
@ -2,7 +2,8 @@
|
||||||
"name": "Net.Project.B.Quest",
|
"name": "Net.Project.B.Quest",
|
||||||
"rootNamespace": "",
|
"rootNamespace": "",
|
||||||
"references": [
|
"references": [
|
||||||
"GUID:14fe60d984bf9f84eac55c6ea033a8f4"
|
"GUID:14fe60d984bf9f84eac55c6ea033a8f4",
|
||||||
|
"GUID:d750d221812bb1d48baff92e6ef73e28"
|
||||||
],
|
],
|
||||||
"includePlatforms": [],
|
"includePlatforms": [],
|
||||||
"excludePlatforms": [],
|
"excludePlatforms": [],
|
||||||
|
|
|
@ -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
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,11 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 4278a7c2eaeebf54192a2349ccd09e32
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
|
@ -8,7 +8,7 @@ using Unity.Mathematics;
|
||||||
namespace Net.Project.B.World
|
namespace Net.Project.B.World
|
||||||
{
|
{
|
||||||
[MemoryPackable]
|
[MemoryPackable]
|
||||||
public partial record SpotterScopeData
|
public partial record SnapshotData
|
||||||
{
|
{
|
||||||
public string FileName { get; set; }
|
public string FileName { get; set; }
|
||||||
public string Name { get; set; }
|
public string Name { get; set; }
|
||||||
|
@ -17,12 +17,12 @@ namespace Net.Project.B.World
|
||||||
public float3 Position { get; set; }
|
public float3 Position { get; set; }
|
||||||
public quaternion Rotation { get; set; }
|
public quaternion Rotation { get; set; }
|
||||||
}
|
}
|
||||||
public interface ISpotterScopeService
|
public interface ISnapshotService
|
||||||
{
|
{
|
||||||
public string Directory { get; }
|
public string Directory { get; }
|
||||||
public UniTask<SpotterScopeData> Snapshot(float3 position, quaternion rotation, int fov);
|
public UniTask<SnapshotData> Snapshot(float3 position, quaternion rotation, int fov);
|
||||||
UniTask<IReadOnlyList<SpotterScopeData>> GetSnapshots();
|
UniTask<IReadOnlyList<SnapshotData>> GetSnapshots();
|
||||||
public event Action<SpotterScopeData> OnSnapshot;
|
public event Action<SnapshotData> OnSnapshot;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
|
@ -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
|
||||||
|
}
|
|
@ -0,0 +1,8 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 5147f3463bd84e447a217effbd935234
|
||||||
|
folderAsset: yes
|
||||||
|
DefaultImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
|
@ -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
|
||||||
|
}
|
|
@ -0,0 +1,7 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: a11a23d94d62c8b469f6b2542e489fc7
|
||||||
|
AssemblyDefinitionImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
|
@ -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;
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,11 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: b3ed4589893641d41af890c80dd6b306
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
|
@ -5,7 +5,8 @@
|
||||||
"GUID:14fe60d984bf9f84eac55c6ea033a8f4",
|
"GUID:14fe60d984bf9f84eac55c6ea033a8f4",
|
||||||
"GUID:f51ebe6a0ceec4240a699833d6309b23",
|
"GUID:f51ebe6a0ceec4240a699833d6309b23",
|
||||||
"GUID:677cd05ca06c46b4395470200b1acdad",
|
"GUID:677cd05ca06c46b4395470200b1acdad",
|
||||||
"GUID:5087931ed5612e84ca166071da8e35a4"
|
"GUID:5087931ed5612e84ca166071da8e35a4",
|
||||||
|
"GUID:46b59e80b22f9f04dbd080f812276bc4"
|
||||||
],
|
],
|
||||||
"includePlatforms": [],
|
"includePlatforms": [],
|
||||||
"excludePlatforms": [],
|
"excludePlatforms": [],
|
||||||
|
|
|
@ -4,6 +4,7 @@ using System.Collections.Generic;
|
||||||
using BITKit;
|
using BITKit;
|
||||||
using BITKit.UX;
|
using BITKit.UX;
|
||||||
using Microsoft.Extensions.Logging;
|
using Microsoft.Extensions.Logging;
|
||||||
|
using Net.Project.B.Buff;
|
||||||
using Net.Project.B.World;
|
using Net.Project.B.World;
|
||||||
|
|
||||||
namespace Net.Project.B.UX
|
namespace Net.Project.B.UX
|
||||||
|
@ -39,11 +40,17 @@ namespace Net.Project.B.UX
|
||||||
public interface IUXMapSelector:IUXPanel{}
|
public interface IUXMapSelector:IUXPanel{}
|
||||||
public interface IUXSnapshotWindow:IUXPanel
|
public interface IUXSnapshotWindow:IUXPanel
|
||||||
{
|
{
|
||||||
void Open(SpotterScopeData scopeData);
|
void Open(SnapshotData scopeData);
|
||||||
}
|
}
|
||||||
public interface IUXSnapshot:IUXPanel{}
|
public interface IUXSnapshot:IUXPanel{}
|
||||||
public interface IUXInventorySwap:IUXPanel{}
|
public interface IUXInventorySwap:IUXPanel{}
|
||||||
public interface IUXMap:IUXPanel{}
|
public interface IUXMap:IUXPanel{}
|
||||||
public interface IUXIndicator:IUXPanel{}
|
public interface IUXIndicator:IUXPanel{}
|
||||||
public interface IUXMark:IUXPanel{}
|
public interface IUXMark:IUXPanel{}
|
||||||
|
public interface IUXQuest:IUXPanel{}
|
||||||
|
|
||||||
|
public interface IUXSurvival : IUXPanel
|
||||||
|
{
|
||||||
|
public IReadOnlyCollection<IBuff> SurvivalBuffs { get; set; }
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,15 +16,11 @@ namespace Net.Project.B.WorldNode
|
||||||
[SerializeField] private GameObject[] floors;
|
[SerializeField] private GameObject[] floors;
|
||||||
[SerializeField] private GameObject[] floorButtons;
|
[SerializeField] private GameObject[] floorButtons;
|
||||||
[SerializeField] private Rigidbody platform;
|
[SerializeField] private Rigidbody platform;
|
||||||
|
[SerializeField] private GameObject elevatorButton;
|
||||||
public Rigidbody Platform => platform;
|
public Rigidbody Platform => platform;
|
||||||
public readonly Dictionary<int, (GameObject floor, GameObject button)> Floors = new();
|
public GameObject[] Floors => floors;
|
||||||
public void Initialize()
|
public GameObject[] FloorButtons => floorButtons;
|
||||||
{
|
public GameObject ElevatorButton => elevatorButton;
|
||||||
for (var index = 0; index < floors.Length; index++)
|
|
||||||
{
|
|
||||||
var floor = floors[index];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -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
|
|
@ -0,0 +1,11 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 5a24ba0c7610fe14eb6cfb6c9e2695c1
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
|
@ -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
|
|
@ -0,0 +1,11 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 66a03ae86cb349b40808fecc8eb0f2bf
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
|
@ -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
|
|
@ -0,0 +1,11 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 6414561ed7da36540a4c9d429cced3eb
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
|
@ -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
|
|
@ -0,0 +1,11 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 58b9d89a09f75ac44a079ecbb6d8b9b2
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
Loading…
Reference in New Issue