Breakpoint
main branch is breaked
This commit is contained in:
@@ -1,124 +0,0 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using BITKit;
|
||||
using BITKit.Game;
|
||||
using BITKit.SceneManagement;
|
||||
#if STEAMWORKS_NET
|
||||
using BITKit.Steamwork;
|
||||
#endif
|
||||
using Cysharp.Threading.Tasks;
|
||||
using UnityEngine;
|
||||
using UnityEngine.SceneManagement;
|
||||
|
||||
namespace BITFALL.Game{
|
||||
[Serializable]
|
||||
public sealed class GameServiceSingleton:GameServiceImplement
|
||||
{
|
||||
protected override IGameService service => GameService.Singleton;
|
||||
}
|
||||
public sealed class GameService : StateBasedMonoBehaviour<IGameState>,IGameService
|
||||
{
|
||||
public static IGameService Singleton { get; set; }
|
||||
|
||||
[Header(Constant.Header.Settings)]
|
||||
[SerializeReference,SubclassSelector] private IReference expectedMap;
|
||||
|
||||
[Header(Constant.Header.Providers)]
|
||||
[SerializeReference,SubclassSelector] private INetClient netClient;
|
||||
[SerializeReference,SubclassSelector] private INetServer netServer;
|
||||
[SerializeReference,SubclassSelector] private ISceneService sceneService;
|
||||
#if STEAMWORKS_NET
|
||||
[SerializeReference, SubclassSelector] private ISteamService steamService;
|
||||
#endif
|
||||
|
||||
[SerializeField] private Optional<string> allowLoadOfflineMap;
|
||||
|
||||
private readonly Optional<string> _currentMap = new();
|
||||
private INetProvider clientNetProvider => netClient.Source as INetProvider;
|
||||
private INetProvider serverNetProvider => netServer.Source as INetProvider;
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
Singleton = this;
|
||||
}
|
||||
|
||||
private void Start()
|
||||
{
|
||||
Initialize();
|
||||
TransitionState<GameInMenuState>();
|
||||
|
||||
clientNetProvider.AddCommandListener<GameChangeMapCommand>(ChangeMap);
|
||||
|
||||
netServer.OnClientConnected += OnClientConnected;
|
||||
|
||||
sceneService.OnSceneLoaded += OnSceneLoaded;
|
||||
destroyCancellationToken.Register(() =>
|
||||
{
|
||||
netServer.OnClientConnected -= OnClientConnected;
|
||||
sceneService.OnSceneLoaded -= OnSceneLoaded;
|
||||
|
||||
//clientNetProvider.RemoveCommandListener<GameChangeMapCommand>(ChangeMap);
|
||||
});
|
||||
|
||||
if(PlayerPrefs.HasKey(BITConstant.Environment.sv_map))
|
||||
{
|
||||
expectedMap = new Reference(PlayerPrefs.GetString(BITConstant.Environment.sv_map));
|
||||
}
|
||||
}
|
||||
|
||||
private void OnSceneLoaded(string obj)
|
||||
{
|
||||
TransitionState<GameInPlayState>();
|
||||
}
|
||||
|
||||
private void OnClientConnected(int obj)
|
||||
{
|
||||
serverNetProvider.ClientCommand(obj,new GameChangeMapCommand(){MapName = _currentMap.Value});
|
||||
}
|
||||
private void ChangeMap(GameChangeMapCommand obj)
|
||||
{
|
||||
TransitionState<GameLoadingState>();
|
||||
sceneService.LoadSceneAsync(obj.MapName,default,LoadSceneMode.Single).Forget();
|
||||
_currentMap.SetValueThenAllow(obj.MapName);
|
||||
}
|
||||
|
||||
public string ExpectMap
|
||||
{
|
||||
get => expectedMap.Value;
|
||||
set
|
||||
{
|
||||
expectedMap = new Reference(value);
|
||||
PlayerPrefs.SetString(BITConstant.Environment.sv_map,value);
|
||||
PlayerPrefs.Save();
|
||||
}
|
||||
}
|
||||
public void Play()
|
||||
{
|
||||
if (allowLoadOfflineMap.Allow)
|
||||
{
|
||||
ChangeMap(new GameChangeMapCommand(){MapName = allowLoadOfflineMap.Value});
|
||||
}
|
||||
else
|
||||
{
|
||||
ChangeMap(new GameChangeMapCommand() { MapName = expectedMap.Value });
|
||||
}
|
||||
}
|
||||
public void Stop()
|
||||
{
|
||||
TransitionState<GameInMenuState>();
|
||||
if (allowLoadOfflineMap.Allow)
|
||||
{
|
||||
sceneService.UnloadSceneAsync(allowLoadOfflineMap.Value,default).Forget();
|
||||
}else if (_currentMap.Allow)
|
||||
{
|
||||
sceneService.UnloadSceneAsync(_currentMap.Value,default).Forget();
|
||||
}
|
||||
if(netClient.IsConnected)
|
||||
netClient.Disconnect();
|
||||
if(netServer.IsRunningServer)
|
||||
netServer.StopServer();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@@ -1,45 +0,0 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using BITKit.Game;
|
||||
using BITKit.StateMachine;
|
||||
using UnityEngine;
|
||||
|
||||
namespace BITFALL.Game
|
||||
{
|
||||
public abstract class GameState:IGameState
|
||||
{
|
||||
bool IState.Enabled { get; set; }
|
||||
public virtual void Initialize()
|
||||
{
|
||||
}
|
||||
|
||||
public virtual void OnStateEntry(IState old)
|
||||
{
|
||||
}
|
||||
|
||||
public virtual void OnStateUpdate(float deltaTime)
|
||||
{
|
||||
}
|
||||
|
||||
public virtual void OnStateExit(IState old, IState newState)
|
||||
{
|
||||
}
|
||||
}
|
||||
[Serializable]
|
||||
public sealed class GameInMenuState : GameState,IGameMenuState
|
||||
{
|
||||
|
||||
}
|
||||
[Serializable]
|
||||
public sealed class GameLoadingState : GameState,IGameLoadingState
|
||||
{
|
||||
|
||||
}
|
||||
[Serializable]
|
||||
public sealed class GameInPlayState : GameState,IGamePlayingState
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
}
|
@@ -8,7 +8,6 @@ using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using BITKit;
|
||||
using BITKit.Entities;
|
||||
using BITKit.Game;
|
||||
using Cysharp.Threading.Tasks;
|
||||
using Unity.Mathematics;
|
||||
using UnityEngine;
|
||||
@@ -141,7 +140,7 @@ namespace BITFALL.Items
|
||||
[SerializeReference, SubclassSelector] private ITicker ticker;
|
||||
[SerializeReference, SubclassSelector] private INetClient netClient;
|
||||
[SerializeReference, SubclassSelector] private INetServer netServer;
|
||||
[SerializeReference, SubclassSelector] private IGameService gameService;
|
||||
//[SerializeReference, SubclassSelector] private IGameService gameService;
|
||||
|
||||
private INetProvider clientNetProvider => netClient.Source as INetProvider;
|
||||
private INetProvider serverNetProvider => netServer.Source as INetProvider;
|
||||
@@ -238,7 +237,7 @@ namespace BITFALL.Items
|
||||
|
||||
private void Tick(float obj)
|
||||
{
|
||||
if(gameService.CurrentState is not IGamePlayingState || !this) return;
|
||||
//if(gameService.CurrentState is not IGamePlayingState || !this) return;
|
||||
var addList = ListPool<WorldItem>.Get();
|
||||
while (_registerQueue.TryDequeue(out var item))
|
||||
{
|
||||
|
@@ -8,7 +8,6 @@ using BITKit;
|
||||
using BITKit.Entities;
|
||||
using BITKit.Entities.Player;
|
||||
using BITKit.Events;
|
||||
using BITKit.Game;
|
||||
using BITKit.Sensors;
|
||||
using Cysharp.Threading.Tasks;
|
||||
using UnityEngine;
|
||||
@@ -18,7 +17,6 @@ namespace BITFALL.Scenes
|
||||
public class EvacuateArea : MonoBehaviour,IAction
|
||||
{
|
||||
[SerializeReference, SubclassSelector] private ISensor sensor;
|
||||
[SerializeReference,SubclassSelector] private IGameService gameService;
|
||||
[SerializeField] private Optional<float> stopGameWhenEvacuated = new();
|
||||
|
||||
[SerializeField] private UnityEvent onEvacuated;
|
||||
@@ -55,7 +53,8 @@ namespace BITFALL.Scenes
|
||||
}
|
||||
|
||||
BIT4Log.Log<EvacuateArea>($"玩家已撤离,战局已停止");
|
||||
gameService.Stop();
|
||||
|
||||
//gameService.Stop();
|
||||
|
||||
onEvacuated?.Invoke();
|
||||
}
|
||||
|
@@ -2,7 +2,6 @@ using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using BITKit;
|
||||
using BITKit.Game;
|
||||
using BITKit.IO;
|
||||
using BITKit.SceneManagement;
|
||||
using BITKit.UX;
|
||||
@@ -13,7 +12,7 @@ namespace BITFALL.UX
|
||||
{
|
||||
public class UXMapSelector : MonoBehaviour
|
||||
{
|
||||
[SerializeReference, SubclassSelector] private IGameService gameService;
|
||||
//[SerializeReference, SubclassSelector] private IGameService gameService;
|
||||
[SerializeReference,SubclassSelector] private ISceneService sceneService;
|
||||
[SerializeField] private VisualTreeAsset mapItemTemplate;
|
||||
|
||||
@@ -48,9 +47,9 @@ namespace BITFALL.UX
|
||||
|
||||
instance.button.clickable.clicked += () =>
|
||||
{
|
||||
gameService.ExpectMap = path;
|
||||
|
||||
gameService.Play();
|
||||
// gameService.ExpectMap = path;
|
||||
//
|
||||
// gameService.Play();
|
||||
};
|
||||
}
|
||||
}
|
||||
|
@@ -3,11 +3,9 @@ using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Security.Policy;
|
||||
using BITFALL.Game;
|
||||
using UnityEngine;
|
||||
using UnityEngine.InputSystem;
|
||||
using BITKit;
|
||||
using BITKit.Game;
|
||||
using BITKit.IO;
|
||||
using BITKit.Mod;
|
||||
using BITKit.SceneManagement;
|
||||
@@ -33,8 +31,8 @@ namespace BITFALL.UX
|
||||
[SerializeField] private UXButton exitButton;
|
||||
[SerializeField] private UXDropdown mapDropdown;
|
||||
|
||||
[Header(Constant.Header.Providers)]
|
||||
[SerializeReference,SubclassSelector] private IGameService gameService;
|
||||
//[Header(Constant.Header.Providers)]
|
||||
//[SerializeReference,SubclassSelector] private IGameService gameService;
|
||||
|
||||
[Header(Constant.Header.Input)]
|
||||
[SerializeField] private InputActionReference returnAction;
|
||||
@@ -70,11 +68,11 @@ namespace BITFALL.UX
|
||||
if (destroyCancellationToken.IsCancellationRequested) return;
|
||||
var tags = mapTags.Select(x => x.Value).ToArray();
|
||||
mapDropdown.visualElement.choices = SceneService.GetScenes(tags).ToList();
|
||||
mapDropdown.visualElement.RegisterValueChangedCallback(x =>
|
||||
{
|
||||
gameService.ExpectMap = x.newValue;
|
||||
});
|
||||
mapDropdown.visualElement.SetValueWithoutNotify(gameService.ExpectMap);
|
||||
// mapDropdown.visualElement.RegisterValueChangedCallback(x =>
|
||||
// {
|
||||
// gameService.ExpectMap = x.newValue;
|
||||
// });
|
||||
// mapDropdown.visualElement.SetValueWithoutNotify(gameService.ExpectMap);
|
||||
//BIT4Log.Log<UXMenu>($"UpdateMapList:{string.Join("\n",mapDropdown.visualElement.choices)}");
|
||||
}
|
||||
|
||||
|
@@ -1,7 +0,0 @@
|
||||
namespace BITFALL.AI
|
||||
{
|
||||
public interface AIAgent
|
||||
{
|
||||
|
||||
}
|
||||
}
|
@@ -1,16 +0,0 @@
|
||||
using Cysharp.Threading.Tasks;
|
||||
|
||||
namespace BITFALL.AI.Commands
|
||||
{
|
||||
public interface AICommand
|
||||
{
|
||||
UniTask Execute();
|
||||
}
|
||||
public struct AttackCommand : AICommand
|
||||
{
|
||||
public UniTask Execute()
|
||||
{
|
||||
return UniTask.CompletedTask;
|
||||
}
|
||||
}
|
||||
}
|
@@ -1,6 +0,0 @@
|
||||
|
||||
namespace BITFALL.AI
|
||||
{
|
||||
public interface AIActionReason{}
|
||||
|
||||
}
|
@@ -1,134 +0,0 @@
|
||||
|
||||
// ReSharper disable IdentifierTypo
|
||||
|
||||
using System;
|
||||
using BITFALL.AI;
|
||||
using BITKit.StateMachine;
|
||||
using Unity.Mathematics;
|
||||
|
||||
namespace BITKit.AI.States
|
||||
{
|
||||
//基础定义
|
||||
public interface AI_Base:IState
|
||||
{
|
||||
/// <summary>
|
||||
/// 为什么进入这个状态
|
||||
/// </summary>
|
||||
AIActionReason Reason { get; }
|
||||
}
|
||||
[Serializable]
|
||||
public abstract class AIState:AI_Base
|
||||
{
|
||||
public bool Enabled { get; set; }
|
||||
public AIActionReason Reason { get; set; }
|
||||
public virtual void Initialize()
|
||||
{
|
||||
}
|
||||
public virtual void OnStateEntry(IState old)
|
||||
{
|
||||
}
|
||||
public virtual void OnStateUpdate(float deltaTime)
|
||||
{
|
||||
}
|
||||
public virtual void OnStateExit(IState old, IState newState)
|
||||
{
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// 静止,无任何行为
|
||||
/// </summary>
|
||||
public interface AI_Idle:AI_Base{}
|
||||
/// <summary>
|
||||
/// 巡逻,通常是哨兵AI才会有的状态
|
||||
/// </summary>
|
||||
public interface AI_Patrol:AI_Base
|
||||
{
|
||||
/// <summary>
|
||||
/// 巡逻点
|
||||
/// </summary>
|
||||
float3[] PatrolPoints { get; }
|
||||
}
|
||||
/// <summary>
|
||||
/// AI追踪,通常为丢失目标一定时间后
|
||||
/// </summary>
|
||||
public interface AI_Track:AI_Base
|
||||
{
|
||||
/// <summary>
|
||||
/// 当前目标
|
||||
/// </summary>
|
||||
AITarget CurrentTarget { get; }
|
||||
}
|
||||
/// <summary>
|
||||
/// AI警戒,此时还未发现敌人
|
||||
/// </summary>
|
||||
public interface AI_Alert:AI_Base
|
||||
{
|
||||
/// <summary>
|
||||
/// 当前警戒级别,如果最高则进入战斗状态
|
||||
/// </summary>
|
||||
int AlertLevel { get; }
|
||||
/// <summary>
|
||||
/// 剩余警戒时间
|
||||
/// </summary>
|
||||
float RemainingAlertTime { get; }
|
||||
}
|
||||
/// <summary>
|
||||
/// 战斗状态,明确的敌人
|
||||
/// </summary>
|
||||
public interface AI_Combat:AI_Base
|
||||
{
|
||||
/// <summary>
|
||||
/// 当前目标
|
||||
/// </summary>
|
||||
AITarget CurrentTarget { get; }
|
||||
}
|
||||
/// <summary>
|
||||
/// 逃跑,通常是人类AI或者特殊感染者才有的状态
|
||||
/// </summary>
|
||||
public interface AI_Flee:AI_Base
|
||||
{
|
||||
float3 NextPoint { get; }
|
||||
}
|
||||
/// <summary>
|
||||
/// 通常只有感染者AI才会有的状态
|
||||
/// </summary>
|
||||
public interface AI_Wander:AI_Base
|
||||
{
|
||||
/// <summary>
|
||||
/// 下一个漫步的位置
|
||||
/// </summary>
|
||||
float3 NextPoint { get; }
|
||||
}
|
||||
/// <summary>
|
||||
/// 死亡,回收进AI池
|
||||
/// </summary>
|
||||
public interface AI_Death:AI_Base
|
||||
{
|
||||
|
||||
}
|
||||
/// <summary>
|
||||
/// 濒死状态,如果一定时间内没有救助,则进入死亡状态
|
||||
/// </summary>
|
||||
public interface AI_Dying:AI_Base
|
||||
{
|
||||
int RemainingHealthPoint { get; }
|
||||
}
|
||||
/// <summary>
|
||||
/// 探索,通常是人类AI才会有的状态
|
||||
/// </summary>
|
||||
public interface AI_Explore:AI_Base
|
||||
{
|
||||
}
|
||||
/// <summary>
|
||||
/// 行为,这是个口袋状态,任何特殊状态都可以放在这里
|
||||
/// </summary>
|
||||
public interface AI_Action:AI_Base
|
||||
{
|
||||
}
|
||||
/// <summary>
|
||||
/// 休息状态,通常是人类AI在睡眠或者在逃跑成功后会有的状态
|
||||
/// </summary>
|
||||
public interface AI_Rest:AI_Base
|
||||
{
|
||||
}
|
||||
}
|
@@ -1,11 +0,0 @@
|
||||
|
||||
using Unity.Mathematics;
|
||||
|
||||
namespace BITFALL.AI
|
||||
{
|
||||
public interface AITarget
|
||||
{
|
||||
float3 Position { get; }
|
||||
quaternion Rotation { get; }
|
||||
}
|
||||
}
|
@@ -1,18 +0,0 @@
|
||||
{
|
||||
"name": "BITFALL.AI",
|
||||
"rootNamespace": "",
|
||||
"references": [
|
||||
"GUID:14fe60d984bf9f84eac55c6ea033a8f4",
|
||||
"GUID:d8b63aba1907145bea998dd612889d6b",
|
||||
"GUID:f51ebe6a0ceec4240a699833d6309b23"
|
||||
],
|
||||
"includePlatforms": [],
|
||||
"excludePlatforms": [],
|
||||
"allowUnsafeCode": false,
|
||||
"overrideReferences": false,
|
||||
"precompiledReferences": [],
|
||||
"autoReferenced": true,
|
||||
"defineConstraints": [],
|
||||
"versionDefines": [],
|
||||
"noEngineReferences": true
|
||||
}
|
@@ -1,148 +0,0 @@
|
||||
using System;
|
||||
using BITKit;
|
||||
|
||||
namespace BITFALL
|
||||
{
|
||||
public static class BITConstant
|
||||
{
|
||||
public static class Player
|
||||
{
|
||||
public const string Empty =nameof(Empty);
|
||||
public const string Movement =nameof(Movement);
|
||||
public const string Idle =nameof(Idle);
|
||||
public const string Run = nameof(Run);
|
||||
public const string Sprint = nameof(Sprint);
|
||||
public const string AllowFire = nameof(AllowFire);
|
||||
public const string Stable = nameof(Stable);
|
||||
public const string Aim = nameof(Aim);
|
||||
public const string AimFire = nameof(AimFire);
|
||||
public const string Inspect = nameof(Inspect);
|
||||
public const string Interactive = nameof(Interactive);
|
||||
public const string Equip = nameof(Equip);
|
||||
public const string Throw = nameof(Throw);
|
||||
public const string Tactics = nameof(Tactics);
|
||||
public const string Fire = nameof(Fire);
|
||||
public const string Draw =nameof(Draw);
|
||||
public const string QuickDraw =nameof(QuickDraw);
|
||||
public const string Reload = nameof(Reload);
|
||||
public const string BoltAction = nameof(BoltAction);
|
||||
public const string Melee =nameof(Melee);
|
||||
public const string IsGrounded =nameof(IsGrounded);
|
||||
public const string IsCrouched =nameof(IsCrouched);
|
||||
public const string IsMoving =nameof(IsMoving);
|
||||
public const string IsRunning =nameof(IsRunning);
|
||||
public const string IsSprint =nameof(IsSprint);
|
||||
public const string Attack =nameof(Attack);
|
||||
public const string HeavyAttack =nameof(HeavyAttack);
|
||||
public const string Blocking =nameof(Blocking);
|
||||
public const string Dodge =nameof(Dodge);
|
||||
public const string BlockStun =nameof(BlockStun);
|
||||
public const string BlockBreak =nameof(BlockBreak);
|
||||
public const string HitStun =nameof(HitStun);
|
||||
public const string ReadyToThrow =nameof(ReadyToThrow);
|
||||
public const string Charging =nameof(Charging);
|
||||
public const string Climb =nameof(Climb);
|
||||
public const string Use = nameof(Use);
|
||||
public const string Exit =nameof(Exit);
|
||||
public const string Exited =nameof(Exited);
|
||||
public const string Holster = nameof(Holster);
|
||||
public const string Walk = nameof(Walk);
|
||||
public const string Crouch = nameof(Crouch);
|
||||
public const string Slide = nameof(Slide);
|
||||
public const string Parachute = nameof(Parachute);
|
||||
public const string ClimbLadder = nameof(ClimbLadder);
|
||||
public const string Fixed = nameof(Fixed);
|
||||
public const string Vertical = nameof(Vertical);
|
||||
public const string Horizontal = nameof(Horizontal);
|
||||
public const string SqrMagnitude = nameof(SqrMagnitude);
|
||||
public const string Pitch = nameof(Pitch);
|
||||
public const string Jump = nameof(Jump);
|
||||
|
||||
public const string EjectClip = nameof(EjectClip);
|
||||
public const string InsertClip = nameof(InsertClip);
|
||||
public const string Cancel = nameof(Cancel);
|
||||
}
|
||||
public static class Command
|
||||
{
|
||||
public interface ICommand
|
||||
{
|
||||
|
||||
}
|
||||
[Serializable]
|
||||
public struct MoveCommand:ICommand
|
||||
{
|
||||
|
||||
}
|
||||
[Serializable]
|
||||
public struct AttackCommand:ICommand
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
#if UNITY_5_3_OR_NEWER
|
||||
public static class Environment
|
||||
{
|
||||
/// <summary>
|
||||
/// bot数量
|
||||
/// </summary>
|
||||
[DictionaryReferenceConfig(nameof(bot_quota))]
|
||||
public const string bot_quota = nameof(bot_quota);
|
||||
/// <summary>
|
||||
/// 复活时间,-1为不复活
|
||||
/// </summary>
|
||||
[DictionaryReferenceConfig(nameof(mp_respawn_on_death))]
|
||||
public const string mp_respawn_on_death = nameof(mp_respawn_on_death);
|
||||
/// <summary>
|
||||
/// 是否为按住奔跑
|
||||
/// </summary>
|
||||
[DictionaryReferenceConfig(nameof(cl_hold_to_run))]
|
||||
public const string cl_hold_to_run = nameof(cl_hold_to_run);
|
||||
/// <summary>
|
||||
/// 开启生存模式
|
||||
/// </summary>
|
||||
[DictionaryReferenceConfig(nameof(cl_survival_lifecycle_enabled))]
|
||||
public const string cl_survival_lifecycle_enabled = nameof(cl_survival_lifecycle_enabled);
|
||||
/// <summary>
|
||||
/// 是否禁用击倒
|
||||
/// </summary>
|
||||
[DictionaryReferenceConfig(nameof(sp_knockdown_disabled))]
|
||||
public const string sp_knockdown_disabled = nameof(sp_knockdown_disabled);
|
||||
/// <summary>
|
||||
/// 死亡不掉落物品
|
||||
/// </summary>
|
||||
[DictionaryReferenceConfig(nameof(sp_keepInventory))]
|
||||
public const string sp_keepInventory = nameof(sp_keepInventory);
|
||||
/// <summary>
|
||||
/// 是否开启生命值回复
|
||||
/// </summary>
|
||||
[DictionaryReferenceConfig(nameof(sp_health_regeneration_enabled))]
|
||||
public const string sp_health_regeneration_enabled = nameof(sp_health_regeneration_enabled);
|
||||
/// <summary>
|
||||
/// 自动恢复生命值的速度
|
||||
/// </summary>
|
||||
[DictionaryReferenceConfig(nameof(sp_health_regeneration_delay))]
|
||||
public const string sp_health_regeneration_delay = nameof(sp_health_regeneration_delay);
|
||||
/// <summary>
|
||||
/// 自动恢复生命值的值
|
||||
/// </summary>
|
||||
[DictionaryReferenceConfig(nameof(sp_health_regeneration_value))]
|
||||
public const string sp_health_regeneration_value = nameof(sp_health_regeneration_value);
|
||||
/// <summary>
|
||||
/// 地图姓名,通常是服务器指定
|
||||
/// </summary>
|
||||
[DictionaryReferenceConfig(nameof(sv_map))]
|
||||
public const string sv_map = nameof(sv_map);
|
||||
/// <summary>
|
||||
/// 当受到子弹攻击时是否流血
|
||||
/// </summary>
|
||||
[DictionaryReferenceConfig(nameof(cl_bleeding_on_bullet_hit))]
|
||||
public const string cl_bleeding_on_bullet_hit = nameof(cl_bleeding_on_bullet_hit);
|
||||
/// <summary>
|
||||
/// 无限子弹
|
||||
/// </summary>
|
||||
[DictionaryReferenceConfig(nameof(sv_infinite_ammo))]
|
||||
public const string sv_infinite_ammo = nameof(sv_infinite_ammo);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
@@ -1,4 +0,0 @@
|
||||
{
|
||||
"name": "BITFALL",
|
||||
"references":[ "GUID:14fe60d984bf9f84eac55c6ea033a8f4" ]
|
||||
}
|
@@ -1,56 +0,0 @@
|
||||
using BITKit;
|
||||
|
||||
namespace BITFALL
|
||||
{
|
||||
public static class BITHash
|
||||
{
|
||||
public static class Player
|
||||
{
|
||||
public static readonly ConstantHash Movement =nameof(Movement);
|
||||
public static readonly ConstantHash Idle =nameof(Idle);
|
||||
public static readonly ConstantHash Run = nameof(Run);
|
||||
public static readonly ConstantHash Sprint = nameof(Sprint);
|
||||
public static readonly ConstantHash AllowFire = nameof(AllowFire);
|
||||
public static readonly ConstantHash Stable = nameof(Stable);
|
||||
public static readonly ConstantHash Aim = nameof(Aim);
|
||||
public static readonly ConstantHash ActionSpeed =nameof(ActionSpeed);
|
||||
public static readonly ConstantHash Interactive = nameof(Interactive);
|
||||
public static readonly ConstantHash Equip = nameof(Equip);
|
||||
public static readonly ConstantHash Throw = nameof(Throw);
|
||||
public static readonly ConstantHash Fire = nameof(Fire);
|
||||
public static readonly ConstantHash Draw =nameof(Draw);
|
||||
public static readonly ConstantHash Reload = nameof(Reload);
|
||||
public static readonly ConstantHash BoltAction = nameof(BoltAction);
|
||||
public static readonly ConstantHash Melee =nameof(Melee);
|
||||
public static readonly ConstantHash IsGrounded =nameof(IsGrounded);
|
||||
public static readonly ConstantHash IsCrouched =nameof(IsCrouched);
|
||||
public static readonly ConstantHash IsMoving =nameof(IsMoving);
|
||||
public static readonly ConstantHash IsRunning =nameof(IsRunning);
|
||||
public static readonly ConstantHash Attack =nameof(Attack);
|
||||
public static readonly ConstantHash HeavyAttack =nameof(HeavyAttack);
|
||||
public static readonly ConstantHash Blocking =nameof(Blocking);
|
||||
public static readonly ConstantHash Dodge =nameof(Dodge);
|
||||
public static readonly ConstantHash BlockStun =nameof(BlockStun);
|
||||
public static readonly ConstantHash BlockBreak =nameof(BlockBreak);
|
||||
public static readonly ConstantHash HitStun =nameof(HitStun);
|
||||
public static readonly ConstantHash ReadyToThrow =nameof(ReadyToThrow);
|
||||
public static readonly ConstantHash Charging =nameof(Charging);
|
||||
public static readonly ConstantHash Climb =nameof(Climb);
|
||||
public static readonly ConstantHash Use = nameof(Use);
|
||||
public static readonly ConstantHash Exit =nameof(Exit);
|
||||
public static readonly ConstantHash Exited =nameof(Exited);
|
||||
public static readonly ConstantHash Holster = nameof(Holster);
|
||||
public static readonly ConstantHash Walk = nameof(Walk);
|
||||
public static readonly ConstantHash Crouch = nameof(Crouch);
|
||||
public static readonly ConstantHash Slide = nameof(Slide);
|
||||
public static readonly ConstantHash Parachute = nameof(Parachute);
|
||||
public static readonly ConstantHash ClimbLadder = nameof(ClimbLadder);
|
||||
public static readonly ConstantHash Fixed = nameof(Fixed);
|
||||
public static readonly ConstantHash Vertical = nameof(Vertical);
|
||||
public static readonly ConstantHash Horizontal = nameof(Horizontal);
|
||||
public static readonly ConstantHash SqrMagnitude = nameof(SqrMagnitude);
|
||||
public static readonly ConstantHash Cancel = nameof(Cancel);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@@ -1,17 +0,0 @@
|
||||
{
|
||||
"name": "BITFALL.Bullet",
|
||||
"rootNamespace": "",
|
||||
"references": [
|
||||
"GUID:14fe60d984bf9f84eac55c6ea033a8f4",
|
||||
"GUID:d8b63aba1907145bea998dd612889d6b"
|
||||
],
|
||||
"includePlatforms": [],
|
||||
"excludePlatforms": [],
|
||||
"allowUnsafeCode": false,
|
||||
"overrideReferences": false,
|
||||
"precompiledReferences": [],
|
||||
"autoReferenced": true,
|
||||
"defineConstraints": [],
|
||||
"versionDefines": [],
|
||||
"noEngineReferences": true
|
||||
}
|
@@ -1,52 +0,0 @@
|
||||
using System.IO;
|
||||
using BITKit;
|
||||
using Unity.Mathematics;
|
||||
|
||||
namespace BITFALL
|
||||
{
|
||||
public record SpawnBullet : INetMessage
|
||||
{
|
||||
public uint Token;
|
||||
public int Initiator;
|
||||
public float3 Position;
|
||||
public quaternion Rotation;
|
||||
public float3 Forward;
|
||||
public float CreateTime = BITApp.Time.DeltaTime;
|
||||
public int InitialForce;
|
||||
public int StartSpeed;
|
||||
public int MaxDamage;
|
||||
public int InitialDamage;
|
||||
public ulong AssetableId;
|
||||
}
|
||||
public class SpawnBulletSupport : NetMessageReader<SpawnBullet>
|
||||
{
|
||||
public override SpawnBullet ReadBinary(BinaryReader reader)
|
||||
{
|
||||
return new SpawnBullet
|
||||
{
|
||||
Token = reader.ReadUInt32(),
|
||||
Initiator = reader.ReadInt32(),
|
||||
Position = reader.ReadFloat3(),
|
||||
Rotation = reader.ReadQuaternion(),
|
||||
Forward = reader.ReadFloat3(),
|
||||
InitialForce = reader.ReadInt32(),
|
||||
StartSpeed = reader.ReadInt32(),
|
||||
MaxDamage = reader.ReadInt32(),
|
||||
InitialDamage = reader.ReadInt32(),
|
||||
};
|
||||
}
|
||||
|
||||
public override void WriteBinary(BinaryWriter writer, SpawnBullet value)
|
||||
{
|
||||
writer.Write(value.Token);
|
||||
writer.Write(value.Initiator);
|
||||
writer.WriteFloat3(value.Position);
|
||||
writer.WriteQuaternion(value.Rotation);
|
||||
writer.WriteFloat3(value.Forward);
|
||||
writer.Write(value.InitialForce);
|
||||
writer.Write(value.StartSpeed);
|
||||
writer.Write(value.MaxDamage);
|
||||
writer.Write(value.InitialDamage);
|
||||
}
|
||||
}
|
||||
}
|
@@ -1,17 +0,0 @@
|
||||
namespace BITFALL.Bullet
|
||||
{
|
||||
public interface IBulletService
|
||||
{
|
||||
void Spawn(SpawnBullet bullet);
|
||||
}
|
||||
|
||||
public abstract class BulletServiceImplement:IBulletService
|
||||
{
|
||||
protected abstract IBulletService service { get; }
|
||||
private IBulletService _bulletServiceImplementation => service;
|
||||
public void Spawn(SpawnBullet bullet)
|
||||
{
|
||||
_bulletServiceImplementation.Spawn(bullet);
|
||||
}
|
||||
}
|
||||
}
|
@@ -1,16 +0,0 @@
|
||||
{
|
||||
"name": "BITFALL.Cosmetic",
|
||||
"rootNamespace": "",
|
||||
"references": [
|
||||
"GUID:14fe60d984bf9f84eac55c6ea033a8f4"
|
||||
],
|
||||
"includePlatforms": [],
|
||||
"excludePlatforms": [],
|
||||
"allowUnsafeCode": false,
|
||||
"overrideReferences": false,
|
||||
"precompiledReferences": [],
|
||||
"autoReferenced": true,
|
||||
"defineConstraints": [],
|
||||
"versionDefines": [],
|
||||
"noEngineReferences": true
|
||||
}
|
@@ -1,30 +0,0 @@
|
||||
using System;
|
||||
using BITKit.Modification;
|
||||
|
||||
namespace BITFALL.Cosmetic.Types
|
||||
{
|
||||
[Serializable]
|
||||
public struct PlayerAgent:ICosmeticType
|
||||
{
|
||||
public override bool Equals(object obj)
|
||||
{
|
||||
return GetType() == obj?.GetType();
|
||||
}
|
||||
public override int GetHashCode()=>GetType().GetHashCode();
|
||||
|
||||
public IModifyElement[] Require => Array.Empty<IModifyElement>();
|
||||
public IModifyElement[] Incompatible => Array.Empty<IModifyElement>();
|
||||
}
|
||||
[Serializable]
|
||||
public struct PlayerWeaponSkin:ICosmeticType
|
||||
{
|
||||
public override bool Equals(object obj)
|
||||
{
|
||||
return GetType() == obj?.GetType();
|
||||
}
|
||||
public override int GetHashCode()=>GetType().GetHashCode();
|
||||
|
||||
public IModifyElement[] Require => Array.Empty<IModifyElement>();
|
||||
public IModifyElement[] Incompatible => Array.Empty<IModifyElement>();
|
||||
}
|
||||
}
|
@@ -1,27 +0,0 @@
|
||||
using System;
|
||||
using BITKit;
|
||||
using BITKit.Modification;
|
||||
|
||||
namespace BITFALL.Cosmetic
|
||||
{
|
||||
public interface ICosmeticType:IModifyElement
|
||||
{
|
||||
}
|
||||
public interface ICosmeticContent{}
|
||||
|
||||
public interface ICosmetic:IAddressable
|
||||
{
|
||||
ulong Id { get; }
|
||||
ICosmeticType Type { get; }
|
||||
ICosmeticContent[] Contents { get; }
|
||||
}
|
||||
|
||||
public interface ICosmeticService:IModifyManager
|
||||
{
|
||||
ICosmetic[] Cosmetics { get; }
|
||||
event Action OnCosmeticsChange;
|
||||
event Action OnCosmeticsChanged;
|
||||
void SetDirty();
|
||||
}
|
||||
}
|
||||
|
@@ -1,17 +0,0 @@
|
||||
{
|
||||
"name": "BITFALL.Entities.Armor",
|
||||
"rootNamespace": "",
|
||||
"references": [
|
||||
"GUID:14fe60d984bf9f84eac55c6ea033a8f4",
|
||||
"GUID:677cd05ca06c46b4395470200b1acdad"
|
||||
],
|
||||
"includePlatforms": [],
|
||||
"excludePlatforms": [],
|
||||
"allowUnsafeCode": false,
|
||||
"overrideReferences": false,
|
||||
"precompiledReferences": [],
|
||||
"autoReferenced": true,
|
||||
"defineConstraints": [],
|
||||
"versionDefines": [],
|
||||
"noEngineReferences": true
|
||||
}
|
@@ -1,46 +0,0 @@
|
||||
using System;
|
||||
using BITKit;
|
||||
|
||||
namespace BITFALL.Entities.Armor
|
||||
{
|
||||
public interface IArmorType{}
|
||||
public interface IArmor
|
||||
{
|
||||
/// <summary>
|
||||
/// 剩余护甲值的总数
|
||||
/// </summary>
|
||||
int Armor { get; }
|
||||
/// <summary>
|
||||
/// 可以装备的护甲板数量
|
||||
/// </summary>
|
||||
public int PlateCapacity { get; }
|
||||
/// <summary>
|
||||
/// 尝试获取当前护甲
|
||||
/// </summary>
|
||||
/// <param name="item"></param>
|
||||
/// <returns></returns>
|
||||
bool TryGetCurrentArmor(out IBasicItem item);
|
||||
IBasicItem[] Plates { get; }
|
||||
/// <summary>
|
||||
/// 当护甲值改变时
|
||||
/// </summary>
|
||||
event Action<int> OnArmorChanged;
|
||||
/// <summary>
|
||||
/// 当装备护甲时
|
||||
/// </summary>
|
||||
event Action<IBasicItem> OnEquipArmor;
|
||||
/// <summary>
|
||||
/// 当卸下护甲时
|
||||
/// </summary>
|
||||
event Action<IBasicItem> OnUnEquipArmor;
|
||||
/// <summary>
|
||||
/// 当护甲板改变时
|
||||
/// </summary>
|
||||
event Action<IBasicItem[]> OnPlatesChanged;
|
||||
/// <summary>
|
||||
/// 卸载护甲
|
||||
/// </summary>
|
||||
/// <param name="index"></param>
|
||||
void UninstallArmor(int index);
|
||||
}
|
||||
}
|
@@ -1,17 +0,0 @@
|
||||
{
|
||||
"name": "BITFALL.Entities",
|
||||
"rootNamespace": "",
|
||||
"references": [
|
||||
"GUID:14fe60d984bf9f84eac55c6ea033a8f4",
|
||||
"GUID:709caf8d7fb6ef24bbba0ab9962a3ad0"
|
||||
],
|
||||
"includePlatforms": [],
|
||||
"excludePlatforms": [],
|
||||
"allowUnsafeCode": false,
|
||||
"overrideReferences": false,
|
||||
"precompiledReferences": [],
|
||||
"autoReferenced": true,
|
||||
"defineConstraints": [],
|
||||
"versionDefines": [],
|
||||
"noEngineReferences": true
|
||||
}
|
@@ -1,20 +0,0 @@
|
||||
{
|
||||
"name": "BITFALL.Entities.Equipment",
|
||||
"rootNamespace": "",
|
||||
"references": [
|
||||
"GUID:14fe60d984bf9f84eac55c6ea033a8f4",
|
||||
"GUID:d525ad6bd40672747bde77962f1c401e",
|
||||
"GUID:49b49c76ee64f6b41bf28ef951cb0e50",
|
||||
"GUID:677cd05ca06c46b4395470200b1acdad",
|
||||
"GUID:709caf8d7fb6ef24bbba0ab9962a3ad0"
|
||||
],
|
||||
"includePlatforms": [],
|
||||
"excludePlatforms": [],
|
||||
"allowUnsafeCode": false,
|
||||
"overrideReferences": false,
|
||||
"precompiledReferences": [],
|
||||
"autoReferenced": true,
|
||||
"defineConstraints": [],
|
||||
"versionDefines": [],
|
||||
"noEngineReferences": false
|
||||
}
|
@@ -1,11 +0,0 @@
|
||||
using BITKit;
|
||||
|
||||
namespace BITFALL
|
||||
{
|
||||
public interface IEquipmentAsArms : IProperty { }
|
||||
[System.Serializable]
|
||||
public record EquipmentAsWeapon: IEquipmentAsArms { }
|
||||
[System.Serializable]
|
||||
public record EquipmentUseItem: IEquipmentAsArms { }
|
||||
|
||||
}
|
@@ -1,43 +0,0 @@
|
||||
using BITKit;
|
||||
|
||||
namespace BITFALL
|
||||
{
|
||||
public interface IEquipmentSlot
|
||||
{
|
||||
|
||||
}
|
||||
public abstract record EquipmentSlot: IEquipmentSlot
|
||||
{
|
||||
public override int GetHashCode() => GetType().GetHashCode();
|
||||
public virtual bool Equals(EquipmentSlot other)
|
||||
{
|
||||
return other?.GetType() == GetType();
|
||||
}
|
||||
}
|
||||
[System.Serializable]
|
||||
public sealed record EquipmentAsHead: EquipmentSlot { }
|
||||
[System.Serializable]
|
||||
public sealed record EquipmentAsBody : EquipmentSlot { }
|
||||
[System.Serializable]
|
||||
public sealed record EquipmentAsArmor : EquipmentSlot { }
|
||||
[System.Serializable]
|
||||
public sealed record EquipmentAsHeal : EquipmentSlot { }
|
||||
[System.Serializable]
|
||||
public sealed record EquipmentAsBackpack : EquipmentSlot { }
|
||||
[System.Serializable]
|
||||
public sealed record EquipmentAsArmorPlate : EquipmentSlot { }
|
||||
[System.Serializable]
|
||||
public sealed record EquipmentAsTactics : EquipmentSlot { }
|
||||
[System.Serializable]
|
||||
public sealed record EquipmentAsThrow : EquipmentSlot { }
|
||||
[System.Serializable]
|
||||
public sealed record EquipmentAsEquip : EquipmentSlot { }
|
||||
[System.Serializable]
|
||||
public sealed record EquipmentAsSlot : IProperty
|
||||
{
|
||||
#if UNITY_64
|
||||
[UnityEngine.SerializeReference, SubclassSelector]
|
||||
#endif
|
||||
public IEquipmentSlot slot;
|
||||
}
|
||||
}
|
@@ -1,33 +0,0 @@
|
||||
using System;
|
||||
using BITKit;
|
||||
using BITKit.Entities;
|
||||
|
||||
namespace BITFALL.Entities.Equipment
|
||||
{
|
||||
public interface IEntityEquipment
|
||||
{
|
||||
IBasicItem CurrentItem { get; }
|
||||
event Action<IBasicItem> OnEquip;
|
||||
event Action<IBasicItem> OnUnEquip;
|
||||
event Action<string> OnEquipAddressable;
|
||||
event Action<string> OnUnEquipAddressable;
|
||||
int FindIndex(Func<string, bool> factory);
|
||||
bool IsSupportItem(IBasicItem item);
|
||||
void EntryEquip(IBasicItem item);
|
||||
void SetEquipPriority(int priority, IBasicItem item);
|
||||
void SetEquipPriority(int priority, int index);
|
||||
void RemoveEquipPriority(int priority);
|
||||
|
||||
void Register(IEquipBase equipBase);
|
||||
void UnRegister(IEquipBase equipBase);
|
||||
IEquipBase CurrentEquip { get; }
|
||||
}
|
||||
public interface IEquipBase : IEntryElement, IAwake, IStart, IUpdate
|
||||
{
|
||||
string AddressablePath { get; }
|
||||
IEntity Entity { get; set; }
|
||||
IBasicItem Item { get; set; }
|
||||
bool IsSupportItem(IBasicItem item);
|
||||
void PlayAudio(string name);
|
||||
}
|
||||
}
|
@@ -1,16 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using BITKit;
|
||||
|
||||
namespace BITFALL.Entities.Equipment
|
||||
{
|
||||
public interface IEntityEquipmentContainer
|
||||
{
|
||||
IDictionary<IEquipmentSlot, IBasicItem> Equipment { get; }
|
||||
Action<IEquipmentSlot, IBasicItem> OnEquip { get; set; }
|
||||
Action<IEquipmentSlot, IBasicItem> OnDeEquip { get; set; }
|
||||
bool TryDeEquip<T>(T slot = default) where T : IEquipmentSlot;
|
||||
bool TryUseEquip<T>(T slot = default) where T : IEquipmentSlot;
|
||||
bool TryUseEquip(IEquipmentSlot slot);
|
||||
}
|
||||
}
|
@@ -1,3 +0,0 @@
|
||||
{
|
||||
"name": "BITFALL.Entities.Health"
|
||||
}
|
@@ -1,8 +0,0 @@
|
||||
namespace BITFALL.Entities
|
||||
{
|
||||
public interface IPlayerExplosionDamage
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
@@ -1,17 +0,0 @@
|
||||
using System;
|
||||
|
||||
namespace BITFALL.Entities
|
||||
{
|
||||
/// <summary>
|
||||
/// 击倒接口
|
||||
/// </summary>
|
||||
public interface IKnockdown
|
||||
{
|
||||
int KnockedHealth { get; }
|
||||
int InitialKnockedHealth { get; set; }
|
||||
event Action OnKnockdown;
|
||||
event Action OnRevive;
|
||||
bool IsKnockdown { get; }
|
||||
bool IsPressured { get; }
|
||||
}
|
||||
}
|
@@ -1,17 +0,0 @@
|
||||
{
|
||||
"name": "BITFALL.Entities.Improvised",
|
||||
"rootNamespace": "",
|
||||
"references": [
|
||||
"GUID:14fe60d984bf9f84eac55c6ea033a8f4",
|
||||
"GUID:677cd05ca06c46b4395470200b1acdad"
|
||||
],
|
||||
"includePlatforms": [],
|
||||
"excludePlatforms": [],
|
||||
"allowUnsafeCode": false,
|
||||
"overrideReferences": false,
|
||||
"precompiledReferences": [],
|
||||
"autoReferenced": true,
|
||||
"defineConstraints": [],
|
||||
"versionDefines": [],
|
||||
"noEngineReferences": false
|
||||
}
|
@@ -1,18 +0,0 @@
|
||||
using System;
|
||||
using BITKit;
|
||||
|
||||
namespace BITFALL.Entities.Improvised
|
||||
{
|
||||
public interface ImprovisedServiceInterface
|
||||
{
|
||||
public bool IsImprovised { get; }
|
||||
public bool TryGetImprovisedItem(out IBasicItem item);
|
||||
public bool TryEquipImprovisedItem(IBasicItem weapon);
|
||||
public bool TryUnEquipImprovised(out IBasicItem weapon);
|
||||
event Func<IBasicItem,bool> OnTryEquipImprovisedItem;
|
||||
event Func<IBasicItem,bool> OnTryUnEquipImprovisedItem;
|
||||
event Action<IBasicItem> OnEquipImprovisedItem;
|
||||
event Action<IBasicItem> OnUnEquipImprovisedItem;
|
||||
}
|
||||
}
|
||||
|
@@ -1,10 +0,0 @@
|
||||
namespace BITFALL.Entities.Sound
|
||||
{
|
||||
public interface IEntitySFXSource{}
|
||||
public interface IEntityAudioSource
|
||||
{
|
||||
void Play(int id);
|
||||
void Play<T>(int id) where T : IEntitySFXSource;
|
||||
}
|
||||
|
||||
}
|
@@ -1,19 +0,0 @@
|
||||
using BITKit.Entities;
|
||||
using Unity.Mathematics;
|
||||
|
||||
namespace BITFALL.GameMode
|
||||
{
|
||||
/// <summary>
|
||||
/// AI生成器,根据配置生成AI,动态根据参数补充AI
|
||||
/// </summary>
|
||||
public interface AISpawner
|
||||
{
|
||||
string Name { get; }
|
||||
int MinCapacity { get; }
|
||||
int MaxCapacity { get; }
|
||||
IEntity Entity { get; }
|
||||
int CycleMaxCount { get; }
|
||||
float4x4 Bounds { get; }
|
||||
IEntity[] spawnedEntities { get; }
|
||||
}
|
||||
}
|
@@ -1,19 +0,0 @@
|
||||
{
|
||||
"name": "BITFALL.GameMode",
|
||||
"rootNamespace": "",
|
||||
"references": [
|
||||
"GUID:14fe60d984bf9f84eac55c6ea033a8f4",
|
||||
"GUID:d8b63aba1907145bea998dd612889d6b",
|
||||
"GUID:709caf8d7fb6ef24bbba0ab9962a3ad0",
|
||||
"GUID:1193c2664d97cc049a6e4c486c6bce71"
|
||||
],
|
||||
"includePlatforms": [],
|
||||
"excludePlatforms": [],
|
||||
"allowUnsafeCode": false,
|
||||
"overrideReferences": false,
|
||||
"precompiledReferences": [],
|
||||
"autoReferenced": false,
|
||||
"defineConstraints": [],
|
||||
"versionDefines": [],
|
||||
"noEngineReferences": true
|
||||
}
|
@@ -1,13 +0,0 @@
|
||||
using Unity.Mathematics;
|
||||
|
||||
namespace BITFALL.GameMode
|
||||
{
|
||||
public interface InfoEntityStart
|
||||
{
|
||||
public int Property { get; }
|
||||
public float3 Position { get; }
|
||||
public quaternion Rotation { get; }
|
||||
public float4x4 Matrix { get; }
|
||||
}
|
||||
}
|
||||
|
@@ -1,11 +0,0 @@
|
||||
using Unity.Mathematics;
|
||||
|
||||
namespace BITFALL.GameMode
|
||||
{
|
||||
public interface InfoLootSpawn
|
||||
{
|
||||
string[] Tags { get; }
|
||||
float3 Position { get; }
|
||||
float3 Size { get; }
|
||||
}
|
||||
}
|
@@ -1,7 +0,0 @@
|
||||
namespace BITFALL.GameMode
|
||||
{
|
||||
public interface InfoNpcStart : InfoEntityStart
|
||||
{
|
||||
public string Name { get; }
|
||||
}
|
||||
}
|
@@ -1,8 +0,0 @@
|
||||
|
||||
namespace BITFALL.GameMode
|
||||
{
|
||||
public interface InfoPlayerStart:InfoEntityStart
|
||||
{
|
||||
}
|
||||
}
|
||||
|
@@ -1,72 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using BITKit;
|
||||
|
||||
namespace BITFALL.GameMode
|
||||
{
|
||||
public class NodeQuery
|
||||
{
|
||||
private static readonly GenericEvent _genericEvent = new();
|
||||
private static readonly GenericEvent _registerEvent = new();
|
||||
private static readonly GenericEvent _unregisterEvent = new();
|
||||
public static T[] Query<T>()
|
||||
{
|
||||
EnsureConfigured<T>();
|
||||
return _genericEvent.Get<CacheList<T>>().ValueArray;
|
||||
}
|
||||
public static T[] Query<T>(Type type)
|
||||
{
|
||||
EnsureConfigured<T>();
|
||||
_genericEvent.GetDirect(type.GetHashCode(),out var cacheList);
|
||||
return cacheList.As<CacheList<T>>().ValueArray;
|
||||
}
|
||||
public static void AddRegisterListener(Type type, Action<object> action)
|
||||
{
|
||||
var list = _registerEvent.GetOrAddDirect<List<Action<object>>>(type.GetHashCode(),CreatePool);
|
||||
list.Add(action);
|
||||
}
|
||||
public static void RemoveRegisterListener(Type type, Action<object> action)
|
||||
{
|
||||
var list = _registerEvent.GetOrAddDirect<List<Action<object>>>(type.GetHashCode(),CreatePool);
|
||||
list.Remove(action);
|
||||
}
|
||||
public static void AddUnregisterListener(Type type, Action<object> action)
|
||||
{
|
||||
var list = _unregisterEvent.GetOrAddDirect<List<Action<object>>>(type.GetHashCode(),CreatePool);
|
||||
list.Add(action);
|
||||
}
|
||||
public static void RemoveUnregisterListener(Type type, Action<object> action)
|
||||
{
|
||||
var list = _unregisterEvent.GetOrAddDirect<List<Action<object>>>(type.GetHashCode(),CreatePool);
|
||||
list.Remove(action);
|
||||
}
|
||||
public static void Register<T>(T value)
|
||||
{
|
||||
EnsureConfigured<T>();
|
||||
_genericEvent.Get<CacheList<T>>().Add(value);
|
||||
var list = _registerEvent.GetOrAddDirect<List<Action<object>>>(typeof(T).GetHashCode(),CreatePool);
|
||||
foreach (var x in list)
|
||||
{
|
||||
x.Invoke(value);
|
||||
}
|
||||
}
|
||||
|
||||
public static void Unregister<T>(T value)
|
||||
{
|
||||
EnsureConfigured<T>();
|
||||
_genericEvent.Get<CacheList<T>>().Remove(value);
|
||||
var list = _unregisterEvent.GetOrAddDirect<List<Action<object>>>(typeof(T).GetHashCode(),CreatePool);
|
||||
foreach (var x in list)
|
||||
{
|
||||
x.Invoke(value);
|
||||
}
|
||||
}
|
||||
private static void EnsureConfigured<T>()
|
||||
{
|
||||
if (_genericEvent.Get<CacheList<T>>() is null)
|
||||
_genericEvent.Set(new CacheList<T>());
|
||||
}
|
||||
private static List<Action<object>> CreatePool()=>new();
|
||||
}
|
||||
}
|
||||
|
@@ -1,16 +0,0 @@
|
||||
{
|
||||
"name": "BITFALL.GameService",
|
||||
"rootNamespace": "",
|
||||
"references": [
|
||||
"GUID:14fe60d984bf9f84eac55c6ea033a8f4"
|
||||
],
|
||||
"includePlatforms": [],
|
||||
"excludePlatforms": [],
|
||||
"allowUnsafeCode": false,
|
||||
"overrideReferences": false,
|
||||
"precompiledReferences": [],
|
||||
"autoReferenced": true,
|
||||
"defineConstraints": [],
|
||||
"versionDefines": [],
|
||||
"noEngineReferences": true
|
||||
}
|
@@ -1,11 +0,0 @@
|
||||
namespace BITKit.Game
|
||||
{
|
||||
public struct GameChangeMapCommand
|
||||
{
|
||||
public string MapName;
|
||||
}
|
||||
public struct GameRequestMapCommand
|
||||
{
|
||||
public string MapName;
|
||||
}
|
||||
}
|
@@ -1,103 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using BITKit.StateMachine;
|
||||
|
||||
namespace BITKit.Game
|
||||
{
|
||||
/// <summary>
|
||||
/// 游戏状态,例如:主菜单,战局中,结束动画等
|
||||
/// </summary>
|
||||
public interface IGameState:IState{}
|
||||
/// <summary>
|
||||
/// 在主菜单中
|
||||
/// </summary>
|
||||
public interface IGameMenuState{}
|
||||
/// <summary>
|
||||
/// 加载中,也可用于缓冲中
|
||||
/// </summary>
|
||||
public interface IGameLoadingState{}
|
||||
/// <summary>
|
||||
/// 游戏中
|
||||
/// </summary>
|
||||
public interface IGamePlayingState{}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 游戏服务,简称游戏状态机
|
||||
/// </summary>
|
||||
public interface IGameService:IStateMachine<IGameState>
|
||||
{
|
||||
string ExpectMap { get; set; }
|
||||
void Play();
|
||||
void Stop();
|
||||
}
|
||||
|
||||
public abstract class GameServiceImplement:IGameService
|
||||
{
|
||||
private IGameService _gameServiceImplementation => service;
|
||||
protected abstract IGameService service { get; }
|
||||
public bool Enabled
|
||||
{
|
||||
get => service.Enabled;
|
||||
set => service.Enabled = value;
|
||||
}
|
||||
|
||||
public IGameState CurrentState
|
||||
{
|
||||
get => service.CurrentState;
|
||||
set => service.CurrentState = value;
|
||||
}
|
||||
|
||||
public event Action<IGameState, IGameState> OnStateChanged
|
||||
{
|
||||
add => service.OnStateChanged += value;
|
||||
remove => service.OnStateChanged -= value;
|
||||
}
|
||||
|
||||
public event Action<IGameState> OnStateRegistered;
|
||||
public event Action<IGameState> OnStateUnRegistered;
|
||||
|
||||
public IDictionary<Type, IGameState> StateDictionary => service.StateDictionary;
|
||||
|
||||
public void Initialize()
|
||||
{
|
||||
service.Initialize();
|
||||
}
|
||||
|
||||
public void UpdateState(float deltaTime)
|
||||
{
|
||||
service.UpdateState(deltaTime);
|
||||
}
|
||||
|
||||
public void DisposeState()
|
||||
{
|
||||
service.DisposeState();
|
||||
}
|
||||
|
||||
public void TransitionState<State>() where State : IGameState
|
||||
{
|
||||
service.TransitionState<State>();
|
||||
}
|
||||
|
||||
public void TransitionState(IGameState state)
|
||||
{
|
||||
service.TransitionState(state);
|
||||
}
|
||||
|
||||
public string ExpectMap
|
||||
{
|
||||
get => _gameServiceImplementation.ExpectMap;
|
||||
set => _gameServiceImplementation.ExpectMap = value;
|
||||
}
|
||||
|
||||
public void Play()
|
||||
{
|
||||
_gameServiceImplementation.Play();
|
||||
}
|
||||
|
||||
public void Stop()
|
||||
{
|
||||
_gameServiceImplementation.Stop();
|
||||
}
|
||||
}
|
||||
}
|
@@ -1,17 +0,0 @@
|
||||
{
|
||||
"name": "BITFALL.Industry",
|
||||
"rootNamespace": "",
|
||||
"references": [
|
||||
"GUID:14fe60d984bf9f84eac55c6ea033a8f4",
|
||||
"GUID:d8b63aba1907145bea998dd612889d6b"
|
||||
],
|
||||
"includePlatforms": [],
|
||||
"excludePlatforms": [],
|
||||
"allowUnsafeCode": false,
|
||||
"overrideReferences": false,
|
||||
"precompiledReferences": [],
|
||||
"autoReferenced": true,
|
||||
"defineConstraints": [],
|
||||
"versionDefines": [],
|
||||
"noEngineReferences": true
|
||||
}
|
@@ -1,29 +0,0 @@
|
||||
namespace BITFALL.Industry
|
||||
{
|
||||
/// <summary>
|
||||
/// 电池设备,通常为手机,电脑,移动电源或者固定设备
|
||||
/// </summary>
|
||||
public interface IBatteryDevice:ITechDevice
|
||||
{
|
||||
/// <summary>
|
||||
/// 电池容量,通常为1000mAh,2000mAh等
|
||||
/// </summary>
|
||||
int BatteryCapacity { get; }
|
||||
/// <summary>
|
||||
/// 当前电量通常为1000mAh,2000mAh等
|
||||
/// </summary>
|
||||
int CurrentBattery { get; }
|
||||
/// <summary>
|
||||
/// 电池剩余电量,通常为0-100
|
||||
/// </summary>
|
||||
int BatteryLevel=>CurrentBattery*100/BatteryCapacity*100;
|
||||
/// <summary>
|
||||
/// 是否允许输出电量给其他设备
|
||||
/// </summary>
|
||||
public bool AllowOutPut { get; }
|
||||
/// <summary>
|
||||
/// 是否允许充电
|
||||
/// </summary>
|
||||
public bool AllowCharge { get; }
|
||||
}
|
||||
}
|
@@ -1,32 +0,0 @@
|
||||
namespace BITFALL.Industry
|
||||
{
|
||||
/// <summary>
|
||||
/// 数据存储,通常为文件,数据库等
|
||||
/// 在这里储存的通常是有些资料,情报等,玩家需要找到秘钥才能解密和读取
|
||||
/// </summary>
|
||||
public interface IDataStorage
|
||||
{
|
||||
/// <summary>
|
||||
/// 是否只读,如果是只读,玩家无法修改
|
||||
/// </summary>
|
||||
bool ReadOnly { get; }
|
||||
/// <summary>
|
||||
/// 内部数据
|
||||
/// </summary>
|
||||
string Data { get; set; }
|
||||
/// <summary>
|
||||
/// 是否加密
|
||||
/// </summary>
|
||||
bool Encrypted { get; set; }
|
||||
/// <summary>
|
||||
/// 尝试解密
|
||||
/// </summary>
|
||||
/// <param name="key">秘钥</param>
|
||||
/// <returns></returns>
|
||||
bool TryDecrypt(string key);
|
||||
/// <summary>
|
||||
/// 秘钥(如果有的话)
|
||||
/// </summary>
|
||||
string Key { get; set; }
|
||||
}
|
||||
}
|
@@ -1,51 +0,0 @@
|
||||
using System;
|
||||
|
||||
namespace BITFALL.Industry
|
||||
{
|
||||
/// <summary>
|
||||
/// 网络类型,通常为有线,无线,蓝牙等
|
||||
/// </summary>
|
||||
public interface INetConnectionType
|
||||
{
|
||||
public int Bandwidth { get; }
|
||||
}
|
||||
/// <summary>
|
||||
/// 以太网,通常为有线网络
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public struct NetEthernetConnection : INetConnectionType
|
||||
{
|
||||
public int Bandwidth => 1000;
|
||||
}
|
||||
/// <summary>
|
||||
/// 通过无线电波连接的网络,通常为天线
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public struct NetRadioConnection : INetConnectionType
|
||||
{
|
||||
public int Bandwidth => 500;
|
||||
}
|
||||
/// <summary>
|
||||
/// 无线网络,通常为wifi
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public struct NetWirelessConnection : INetConnectionType
|
||||
{
|
||||
public int Bandwidth => 100;
|
||||
}
|
||||
/// <summary>
|
||||
/// 移动数据,由于有限的带宽,通常速度较慢
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public struct NetMobileData : INetConnectionType
|
||||
{
|
||||
public int Bandwidth => 10;
|
||||
}
|
||||
/// <summary>
|
||||
/// 接入设备,通常为手机,电脑,用于接入网络
|
||||
/// </summary>
|
||||
public interface INetDevice:IBatteryDevice
|
||||
{
|
||||
public INetConnectionType Connection { get; }
|
||||
}
|
||||
}
|
@@ -1,10 +0,0 @@
|
||||
namespace BITFALL.Industry
|
||||
{
|
||||
/// <summary>
|
||||
/// 网关设备,通常为路由器,天线,用于接入网络
|
||||
/// </summary>
|
||||
public interface INetGateway:INetDevice
|
||||
{
|
||||
|
||||
}
|
||||
}
|
@@ -1,37 +0,0 @@
|
||||
namespace BITFALL.Industry
|
||||
{
|
||||
/// <summary>
|
||||
/// 设备健康状态
|
||||
/// </summary>
|
||||
public enum TechDeviceHealth
|
||||
{
|
||||
/// <summary>
|
||||
/// 设备正常
|
||||
/// </summary>
|
||||
Normal,
|
||||
/// <summary>
|
||||
/// 设备故障,但还可以继续使用
|
||||
/// </summary>
|
||||
Fault,
|
||||
/// <summary>
|
||||
/// 设备损坏
|
||||
/// </summary>
|
||||
Damaged,
|
||||
/// <summary>
|
||||
/// 设备报废
|
||||
/// </summary>
|
||||
Scrap
|
||||
}
|
||||
/// <summary>
|
||||
/// 科技设备,可以为任何科技设备,如手机,电脑,路由器等
|
||||
/// </summary>
|
||||
public interface ITechDevice
|
||||
{
|
||||
public int Id { get; }
|
||||
/// <summary>
|
||||
/// 科技等级,通常为1,2,3等
|
||||
/// </summary>
|
||||
public int TechLevel { get; }
|
||||
public TechDeviceHealth Health { get; }
|
||||
}
|
||||
}
|
@@ -1,30 +0,0 @@
|
||||
using Unity.Mathematics;
|
||||
|
||||
namespace BITFALL.Industry
|
||||
{
|
||||
/// <summary>
|
||||
/// 世界网络服务,用户注册,注销和搜索附近可联网的设备
|
||||
/// </summary>
|
||||
public interface IWorldNetService
|
||||
{
|
||||
/// <summary>
|
||||
/// 注册设备
|
||||
/// </summary>
|
||||
/// <param name="device"></param>
|
||||
void Register(INetDevice device);
|
||||
/// <summary>
|
||||
/// 注销设备
|
||||
/// </summary>
|
||||
/// <param name="device"></param>
|
||||
void Unregister(INetDevice device);
|
||||
/// <summary>
|
||||
/// 搜索设备
|
||||
/// </summary>
|
||||
/// <param name="position">坐标</param>
|
||||
/// <param name="radius">半径</param>
|
||||
/// <param name="minBandwidth">最低带宽</param>
|
||||
/// <returns></returns>
|
||||
INetGateway[] SearchDevices(float3 position, float radius,int minBandwidth);
|
||||
}
|
||||
|
||||
}
|
@@ -1,3 +0,0 @@
|
||||
{
|
||||
"name": "BITFALL.InGame.Internet"
|
||||
}
|
@@ -1,10 +0,0 @@
|
||||
using System;
|
||||
|
||||
namespace BITFALL.InGameInternet
|
||||
{
|
||||
public interface IMeChatService
|
||||
{
|
||||
public event Action<string,string,string> OnMessageReceived;
|
||||
void Send(string sender, string receiver, string message);
|
||||
}
|
||||
}
|
@@ -1,18 +0,0 @@
|
||||
{
|
||||
"name": "BITFALL.LootSystem",
|
||||
"rootNamespace": "",
|
||||
"references": [
|
||||
"GUID:14fe60d984bf9f84eac55c6ea033a8f4",
|
||||
"GUID:2f7d7f857f30f484ea163931f3bc4e0a",
|
||||
"GUID:677cd05ca06c46b4395470200b1acdad"
|
||||
],
|
||||
"includePlatforms": [],
|
||||
"excludePlatforms": [],
|
||||
"allowUnsafeCode": true,
|
||||
"overrideReferences": false,
|
||||
"precompiledReferences": [],
|
||||
"autoReferenced": true,
|
||||
"defineConstraints": [],
|
||||
"versionDefines": [],
|
||||
"noEngineReferences": true
|
||||
}
|
@@ -1,10 +0,0 @@
|
||||
using BITKit;
|
||||
using BITKit.Probability;
|
||||
|
||||
namespace BITFALL.LootSystem
|
||||
{
|
||||
public interface ILootSystem:IProbabilityService<IBasicItem>
|
||||
{
|
||||
|
||||
}
|
||||
}
|
@@ -1,18 +0,0 @@
|
||||
{
|
||||
"name": "BITFALL.Melee",
|
||||
"rootNamespace": "",
|
||||
"references": [
|
||||
"GUID:14fe60d984bf9f84eac55c6ea033a8f4",
|
||||
"GUID:709caf8d7fb6ef24bbba0ab9962a3ad0",
|
||||
"GUID:d8b63aba1907145bea998dd612889d6b"
|
||||
],
|
||||
"includePlatforms": [],
|
||||
"excludePlatforms": [],
|
||||
"allowUnsafeCode": false,
|
||||
"overrideReferences": false,
|
||||
"precompiledReferences": [],
|
||||
"autoReferenced": true,
|
||||
"defineConstraints": [],
|
||||
"versionDefines": [],
|
||||
"noEngineReferences": true
|
||||
}
|
@@ -1,11 +0,0 @@
|
||||
using BITKit.Entities.Melee;
|
||||
|
||||
namespace BITFALL.Combat
|
||||
{
|
||||
public interface IMeleeCombat
|
||||
{
|
||||
void HitStun();
|
||||
void SetConfig(MeleeConfig config);
|
||||
}
|
||||
|
||||
}
|
@@ -1,30 +0,0 @@
|
||||
using System;
|
||||
using Unity.Mathematics;
|
||||
|
||||
namespace BITKit.Entities.Melee
|
||||
{
|
||||
[Serializable]
|
||||
public struct MeleeCommand
|
||||
{
|
||||
public int PlayerId;
|
||||
public float3 Position;
|
||||
public float3 Forward;
|
||||
public float3 Force;
|
||||
public float Range;
|
||||
public int Damage;
|
||||
public int Limit;
|
||||
public string[] IgnoreTags;
|
||||
public bool ForceHitStun;
|
||||
}
|
||||
[Serializable]
|
||||
public struct MeleeConfig
|
||||
{
|
||||
public float3 Position;
|
||||
public quaternion Rotation;
|
||||
}
|
||||
public interface IMeleeService
|
||||
{
|
||||
void Melee(MeleeCommand command);
|
||||
}
|
||||
|
||||
}
|
@@ -1,17 +0,0 @@
|
||||
{
|
||||
"name": "BITFALL.Placement",
|
||||
"rootNamespace": "",
|
||||
"references": [
|
||||
"GUID:14fe60d984bf9f84eac55c6ea033a8f4",
|
||||
"GUID:d8b63aba1907145bea998dd612889d6b"
|
||||
],
|
||||
"includePlatforms": [],
|
||||
"excludePlatforms": [],
|
||||
"allowUnsafeCode": false,
|
||||
"overrideReferences": false,
|
||||
"precompiledReferences": [],
|
||||
"autoReferenced": true,
|
||||
"defineConstraints": [],
|
||||
"versionDefines": [],
|
||||
"noEngineReferences": true
|
||||
}
|
@@ -1,13 +0,0 @@
|
||||
using System;
|
||||
using Unity.Mathematics;
|
||||
|
||||
namespace BITFALL.Placement
|
||||
{
|
||||
public interface IPlacementObject:ICloneable
|
||||
{
|
||||
float PositionIncrement { get; }
|
||||
int RotationIncrement { get; }
|
||||
int3 Size { get; }
|
||||
}
|
||||
|
||||
}
|
@@ -1,12 +0,0 @@
|
||||
namespace BITFALL.Placement
|
||||
{
|
||||
public interface IPlacementService
|
||||
{
|
||||
IPlacementObject[] PlacementObjects { get; }
|
||||
}
|
||||
public abstract class PlacementServiceImplementation : IPlacementService
|
||||
{
|
||||
protected abstract IPlacementService _placementServiceImplementation { get; }
|
||||
public IPlacementObject[] PlacementObjects => _placementServiceImplementation.PlacementObjects;
|
||||
}
|
||||
}
|
@@ -1,18 +0,0 @@
|
||||
{
|
||||
"name": "BITFALL.Player.Command",
|
||||
"rootNamespace": "",
|
||||
"references": [
|
||||
"GUID:14fe60d984bf9f84eac55c6ea033a8f4",
|
||||
"GUID:93ccf870547425a448fbc27f3abfc586",
|
||||
"GUID:677cd05ca06c46b4395470200b1acdad"
|
||||
],
|
||||
"includePlatforms": [],
|
||||
"excludePlatforms": [],
|
||||
"allowUnsafeCode": false,
|
||||
"overrideReferences": false,
|
||||
"precompiledReferences": [],
|
||||
"autoReferenced": true,
|
||||
"defineConstraints": [],
|
||||
"versionDefines": [],
|
||||
"noEngineReferences": true
|
||||
}
|
@@ -1,14 +0,0 @@
|
||||
using BITFALL.Trading;
|
||||
using BITKit;
|
||||
|
||||
namespace BITFALL.Player
|
||||
{
|
||||
public struct PlayerSwapWithContainer
|
||||
{
|
||||
public IBasicItemContainer Container;
|
||||
}
|
||||
public struct PlayerTradeWithTrader
|
||||
{
|
||||
public ITrader Trader;
|
||||
}
|
||||
}
|
@@ -1,17 +0,0 @@
|
||||
{
|
||||
"name": "BITFALL.Player.Equip",
|
||||
"rootNamespace": "",
|
||||
"references": [
|
||||
"GUID:14fe60d984bf9f84eac55c6ea033a8f4",
|
||||
"GUID:709caf8d7fb6ef24bbba0ab9962a3ad0"
|
||||
],
|
||||
"includePlatforms": [],
|
||||
"excludePlatforms": [],
|
||||
"allowUnsafeCode": false,
|
||||
"overrideReferences": false,
|
||||
"precompiledReferences": [],
|
||||
"autoReferenced": true,
|
||||
"defineConstraints": [],
|
||||
"versionDefines": [],
|
||||
"noEngineReferences": false
|
||||
}
|
@@ -1,14 +0,0 @@
|
||||
using BITKit;
|
||||
namespace BITFALL.Player.Equip
|
||||
{
|
||||
public interface IEquipService
|
||||
{
|
||||
IOptional<float> Zoom { get; }
|
||||
float Stable { get; set; }
|
||||
float Aim { get; set; }
|
||||
bool AllowAttack { get; set; }
|
||||
bool AllowScope { get; set; }
|
||||
IValidHandle AllowEquip { get; }
|
||||
}
|
||||
}
|
||||
|
@@ -1,14 +0,0 @@
|
||||
{
|
||||
"name": "BITFALL.Player.Hotkey",
|
||||
"rootNamespace": "",
|
||||
"references": [],
|
||||
"includePlatforms": [],
|
||||
"excludePlatforms": [],
|
||||
"allowUnsafeCode": false,
|
||||
"overrideReferences": false,
|
||||
"precompiledReferences": [],
|
||||
"autoReferenced": true,
|
||||
"defineConstraints": [],
|
||||
"versionDefines": [],
|
||||
"noEngineReferences": true
|
||||
}
|
@@ -1,31 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace BITFALL.Hotkey
|
||||
{
|
||||
public interface IHotkeyProvider
|
||||
{
|
||||
string Name { get; }
|
||||
string Description { get; }
|
||||
object Data { get; }
|
||||
bool Enabled { get; }
|
||||
Action OnPerform { get; }
|
||||
float HoldDuration => 0;
|
||||
}
|
||||
public struct HotkeyProvider : IHotkeyProvider
|
||||
{
|
||||
public string Name { get; set; }
|
||||
public string Description { get; set; }
|
||||
public object Data { get; set; }
|
||||
public bool Enabled { get; set; }
|
||||
public Action OnPerform { get; set; }
|
||||
|
||||
public float HoldDuration { get; set; }
|
||||
}
|
||||
public interface IHotkeyCollection
|
||||
{
|
||||
IEnumerable<IHotkeyProvider> Hotkeys { get; }
|
||||
void Register(IHotkeyProvider hotkey);
|
||||
void UnRegister(IHotkeyProvider hotkey);
|
||||
}
|
||||
}
|
@@ -1,18 +0,0 @@
|
||||
{
|
||||
"name": "BITFALL.Player.Inventory",
|
||||
"rootNamespace": "",
|
||||
"references": [
|
||||
"GUID:14fe60d984bf9f84eac55c6ea033a8f4",
|
||||
"GUID:677cd05ca06c46b4395470200b1acdad",
|
||||
"GUID:49b49c76ee64f6b41bf28ef951cb0e50"
|
||||
],
|
||||
"includePlatforms": [],
|
||||
"excludePlatforms": [],
|
||||
"allowUnsafeCode": false,
|
||||
"overrideReferences": false,
|
||||
"precompiledReferences": [],
|
||||
"autoReferenced": true,
|
||||
"defineConstraints": [],
|
||||
"versionDefines": [],
|
||||
"noEngineReferences": false
|
||||
}
|
@@ -1,39 +0,0 @@
|
||||
using System;
|
||||
using BITKit;
|
||||
#if UNITY_5_3_OR_NEWER
|
||||
using UnityEngine;
|
||||
#endif
|
||||
|
||||
namespace BITFALL.Player.Inventory
|
||||
{
|
||||
public interface IMoneyStrace
|
||||
{
|
||||
int Money { get; }
|
||||
string Detail { get; }
|
||||
}
|
||||
[Serializable]
|
||||
public struct MonetStrace : IMoneyStrace
|
||||
{
|
||||
#if UNITY_5_3_OR_NEWER
|
||||
[SerializeReference]
|
||||
[SubclassSelector]
|
||||
#endif
|
||||
private IReference detail;
|
||||
public int Money { get; set; }
|
||||
|
||||
public string Detail
|
||||
{
|
||||
get => detail.Value;
|
||||
set => detail = new Reference(value);
|
||||
}
|
||||
}
|
||||
public interface IPlayerInventory
|
||||
{
|
||||
int Money { get; }
|
||||
void Transfer(IMoneyStrace strace);
|
||||
event Action<int> OnMoneyChanged;
|
||||
event Action<IMoneyStrace> OnTransfer;
|
||||
void Drop(IMoneyStrace strace);
|
||||
}
|
||||
}
|
||||
|
@@ -1,16 +0,0 @@
|
||||
{
|
||||
"name": "BITFALL.Player.Layout",
|
||||
"rootNamespace": "",
|
||||
"references": [
|
||||
"GUID:14fe60d984bf9f84eac55c6ea033a8f4"
|
||||
],
|
||||
"includePlatforms": [],
|
||||
"excludePlatforms": [],
|
||||
"allowUnsafeCode": false,
|
||||
"overrideReferences": false,
|
||||
"precompiledReferences": [],
|
||||
"autoReferenced": true,
|
||||
"defineConstraints": [],
|
||||
"versionDefines": [],
|
||||
"noEngineReferences": true
|
||||
}
|
@@ -1,10 +0,0 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace BITFALL.Layout
|
||||
{
|
||||
public interface IPlayerLayout
|
||||
{
|
||||
public string Name { get; }
|
||||
IDictionary<string,string> LayoutDictionary { get; }
|
||||
}
|
||||
}
|
@@ -1,7 +0,0 @@
|
||||
namespace BITFALL.Layout
|
||||
{
|
||||
public interface IPlayerLayoutService
|
||||
{
|
||||
bool Load(IPlayerLayout layout);
|
||||
}
|
||||
}
|
@@ -1,17 +0,0 @@
|
||||
{
|
||||
"name": "BITFALL.Player.Medical",
|
||||
"rootNamespace": "",
|
||||
"references": [
|
||||
"GUID:87bea3a21c744b1478660b70494160ba",
|
||||
"GUID:14fe60d984bf9f84eac55c6ea033a8f4"
|
||||
],
|
||||
"includePlatforms": [],
|
||||
"excludePlatforms": [],
|
||||
"allowUnsafeCode": false,
|
||||
"overrideReferences": false,
|
||||
"precompiledReferences": [],
|
||||
"autoReferenced": true,
|
||||
"defineConstraints": [],
|
||||
"versionDefines": [],
|
||||
"noEngineReferences": true
|
||||
}
|
@@ -1,54 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace BITFALL.Player.Medical
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// 玩家医疗接口
|
||||
/// </summary>
|
||||
public interface IPlayerMedical
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取伤口
|
||||
/// </summary>
|
||||
/// <typeparam name="T"></typeparam>
|
||||
/// <returns></returns>
|
||||
IPlayerMedicalWound GetWound<T>() where T : IPlayerMedicalWoundType,new();
|
||||
bool TryGetWound<T>(out IPlayerMedicalWound wound) where T : IPlayerMedicalWoundType,new();
|
||||
/// <summary>
|
||||
/// 添加或更新伤口
|
||||
/// </summary>
|
||||
/// <param name="medical"></param>
|
||||
/// <typeparam name="T"></typeparam>
|
||||
/// <returns></returns>
|
||||
void AddOrUpdateWound<T>(IPlayerMedicalWound medical) where T : IPlayerMedicalWoundType,new();
|
||||
/// <summary>
|
||||
/// 移除伤口
|
||||
/// </summary>
|
||||
/// <typeparam name="T"></typeparam>
|
||||
void RemoveWound<T>() where T : IPlayerMedicalWoundType,new();
|
||||
void RemoveWound(IPlayerMedicalWoundType type);
|
||||
|
||||
/// <summary>
|
||||
/// 获取所有伤口
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
IDictionary<IPlayerMedicalWoundType, IPlayerMedicalWound> GetAllWounds();
|
||||
|
||||
/// <summary>
|
||||
/// 当伤口发生变化时
|
||||
/// </summary>
|
||||
event Action<IPlayerMedicalWoundType,IPlayerMedicalWound> OnWoundChanged;
|
||||
|
||||
/// <summary>
|
||||
/// 当添加伤口时
|
||||
/// </summary>
|
||||
event Action<IPlayerMedicalWoundType,IPlayerMedicalWound> OnWoundAdded;
|
||||
|
||||
/// <summary>
|
||||
/// 当移除伤口时
|
||||
/// </summary>
|
||||
event Action<IPlayerMedicalWoundType,IPlayerMedicalWound> OnWoundRemoved;
|
||||
}
|
||||
}
|
@@ -1,31 +0,0 @@
|
||||
using System;
|
||||
using BITKit;
|
||||
|
||||
namespace BITFALL.Player.Medical
|
||||
{
|
||||
/// <summary>
|
||||
/// 伤口内部消毒,通常是用双氧水
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public struct Disinfect_InternalWound : IProperty{}
|
||||
/// <summary>
|
||||
/// 伤口外部消毒,通常是用碘伏
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public struct Disinfect_ExternalWound : IProperty{}
|
||||
/// <summary>
|
||||
/// 外部包扎,通常是用绷带或者碎步
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public struct Bandage_ExternalWound : IProperty{}
|
||||
/// <summary>
|
||||
/// 外部缝合,通常是用针线缝合
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public struct Bandage_Suture : IProperty{}
|
||||
/// <summary>
|
||||
/// 清理碎片伤口,通常是用镊子夹出碎片
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public struct Clear_WoundShards:IProperty{}
|
||||
}
|
@@ -1,81 +0,0 @@
|
||||
using System;
|
||||
|
||||
namespace BITFALL.Player.Medical
|
||||
{
|
||||
public interface IPlayerMedicalWound
|
||||
{
|
||||
/// <summary>
|
||||
/// 玩家伤口状态
|
||||
/// </summary>
|
||||
public bool IsHandled { get; }
|
||||
|
||||
/// <summary>
|
||||
/// 伤口等级
|
||||
/// </summary>
|
||||
public int Level { get; }
|
||||
/// <summary>
|
||||
/// 伤口来源
|
||||
/// </summary>
|
||||
public string Source { get; }
|
||||
public float RemainingHealingTime { get; }
|
||||
}
|
||||
|
||||
public interface IPlayerMedicalWoundType
|
||||
{
|
||||
public string DisplayName => GetType().Name;
|
||||
}
|
||||
public struct PlayerMedicalWound : IPlayerMedicalWound
|
||||
{
|
||||
public bool IsHandled { get; set; }
|
||||
public int Level { get; set; }
|
||||
public string Source { get; set; }
|
||||
public float RemainingHealingTime { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 碎片伤口,通常来自于爆炸和子弹
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public struct PlayerDebrisWound : IPlayerMedicalWoundType
|
||||
{
|
||||
public string DisplayName => "碎片伤口";
|
||||
public override bool Equals(object obj)=>obj is PlayerDebrisWound;
|
||||
public override int GetHashCode() => nameof(PlayerDebrisWound).GetHashCode();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 开放性伤口,通常来自于刀割,撕咬和子弹
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public struct PlayerOpenWound : IPlayerMedicalWoundType
|
||||
{
|
||||
public string DisplayName => "开放伤口";
|
||||
public override bool Equals(object obj)=>obj is PlayerOpenWound;
|
||||
public override int GetHashCode() => nameof(PlayerOpenWound).GetHashCode();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 闭合性伤口,通常来自于摔伤,钝器击打和车辆碰撞
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public struct PlayerClosedWound : IPlayerMedicalWoundType
|
||||
{
|
||||
public string DisplayName => "闭合伤口";
|
||||
public override bool Equals(object obj)=>obj is PlayerClosedWound;
|
||||
public override int GetHashCode() => nameof(PlayerClosedWound).GetHashCode();
|
||||
}
|
||||
[Serializable]
|
||||
public struct PlayerDirtyInternalWound : IPlayerMedicalWoundType
|
||||
{
|
||||
public string DisplayName => "内部污染伤口";
|
||||
public override bool Equals(object obj)=>obj is PlayerDirtyInternalWound;
|
||||
public override int GetHashCode() => nameof(PlayerDirtyInternalWound).GetHashCode();
|
||||
}
|
||||
[Serializable]
|
||||
public struct PlayerDirtyExternalWound : IPlayerMedicalWoundType
|
||||
{
|
||||
public string DisplayName => "外部污染伤口";
|
||||
public override bool Equals(object obj)=>obj is PlayerDirtyExternalWound;
|
||||
public override int GetHashCode() => nameof(PlayerDirtyExternalWound).GetHashCode();
|
||||
}
|
||||
}
|
@@ -1,18 +0,0 @@
|
||||
{
|
||||
"name": "BITFALL.Player.Movement",
|
||||
"rootNamespace": "",
|
||||
"references": [
|
||||
"GUID:14fe60d984bf9f84eac55c6ea033a8f4",
|
||||
"GUID:d8b63aba1907145bea998dd612889d6b",
|
||||
"GUID:709caf8d7fb6ef24bbba0ab9962a3ad0"
|
||||
],
|
||||
"includePlatforms": [],
|
||||
"excludePlatforms": [],
|
||||
"allowUnsafeCode": false,
|
||||
"overrideReferences": false,
|
||||
"precompiledReferences": [],
|
||||
"autoReferenced": true,
|
||||
"defineConstraints": [],
|
||||
"versionDefines": [],
|
||||
"noEngineReferences": true
|
||||
}
|
@@ -1,77 +0,0 @@
|
||||
using System;
|
||||
using BITKit.Entities;
|
||||
using Unity.Mathematics;
|
||||
|
||||
namespace BITFALL.Player.Movement
|
||||
{
|
||||
/// <summary>
|
||||
/// 固定座位,如坐在椅子上,开车,骑车等
|
||||
/// </summary>
|
||||
public interface IPlayerFixedPlace
|
||||
{
|
||||
float3 FixedPosition { get; }
|
||||
float3 Velocity { get; }
|
||||
quaternion FixedRotation { get; }
|
||||
float3 ExitPosition { get; }
|
||||
quaternion ExitRotation { get; }
|
||||
bool TryGetFixedEntity(out IEntity entity);
|
||||
event Func<IEntity, bool> OnPlayerEntry;
|
||||
event Func<IEntity,bool> OnPlayerExit;
|
||||
event Action<IEntity> OnPlayerEntered;
|
||||
event Action<IEntity> OnPlayerExited;
|
||||
bool Entry(IEntity player);
|
||||
bool Exit(IEntity player);
|
||||
}
|
||||
public abstract class AbstractPlayerFixedPlace : IPlayerFixedPlace
|
||||
{
|
||||
protected abstract IPlayerFixedPlace _playerFixedPlaceImplementation { get; }
|
||||
float3 IPlayerFixedPlace.FixedPosition => _playerFixedPlaceImplementation.FixedPosition;
|
||||
|
||||
float3 IPlayerFixedPlace.Velocity => _playerFixedPlaceImplementation.Velocity;
|
||||
|
||||
quaternion IPlayerFixedPlace.FixedRotation => _playerFixedPlaceImplementation.FixedRotation;
|
||||
|
||||
float3 IPlayerFixedPlace.ExitPosition => _playerFixedPlaceImplementation.ExitPosition;
|
||||
|
||||
quaternion IPlayerFixedPlace.ExitRotation => _playerFixedPlaceImplementation.ExitRotation;
|
||||
|
||||
bool IPlayerFixedPlace.TryGetFixedEntity(out IEntity entity)
|
||||
{
|
||||
return _playerFixedPlaceImplementation.TryGetFixedEntity(out entity);
|
||||
}
|
||||
|
||||
event Func<IEntity, bool> IPlayerFixedPlace.OnPlayerEntry
|
||||
{
|
||||
add => _playerFixedPlaceImplementation.OnPlayerEntry += value;
|
||||
remove => _playerFixedPlaceImplementation.OnPlayerEntry -= value;
|
||||
}
|
||||
|
||||
event Func<IEntity, bool> IPlayerFixedPlace.OnPlayerExit
|
||||
{
|
||||
add => _playerFixedPlaceImplementation.OnPlayerExit += value;
|
||||
remove => _playerFixedPlaceImplementation.OnPlayerExit -= value;
|
||||
}
|
||||
|
||||
event Action<IEntity> IPlayerFixedPlace.OnPlayerEntered
|
||||
{
|
||||
add => _playerFixedPlaceImplementation.OnPlayerEntered += value;
|
||||
remove => _playerFixedPlaceImplementation.OnPlayerEntered -= value;
|
||||
}
|
||||
|
||||
event Action<IEntity> IPlayerFixedPlace.OnPlayerExited
|
||||
{
|
||||
add => _playerFixedPlaceImplementation.OnPlayerExited += value;
|
||||
remove => _playerFixedPlaceImplementation.OnPlayerExited -= value;
|
||||
}
|
||||
|
||||
bool IPlayerFixedPlace.Entry(IEntity player)
|
||||
{
|
||||
return _playerFixedPlaceImplementation.Entry(player);
|
||||
}
|
||||
|
||||
bool IPlayerFixedPlace.Exit(IEntity player)
|
||||
{
|
||||
return _playerFixedPlaceImplementation.Exit(player);
|
||||
}
|
||||
}
|
||||
}
|
@@ -1,23 +0,0 @@
|
||||
using System;
|
||||
using Unity.Mathematics;
|
||||
|
||||
namespace BITFALL.Player.Movement
|
||||
{
|
||||
public interface IPlayerMovement
|
||||
{
|
||||
bool AllowMovement { get; }
|
||||
float2 InputVector { get; }
|
||||
float Stamina { get; set; }
|
||||
int LimitViewAngle { get; set; }
|
||||
event Action<float> OnStaminaChanged;
|
||||
float3 FpvPosition { get; }
|
||||
quaternion FpvRotation { get; }
|
||||
float3 FpvLocalPosition { get; }
|
||||
quaternion FpvLocalRotation { get; }
|
||||
void AddViewEuler(float2 euler);
|
||||
event Func<bool> TryOpenParachute;
|
||||
event Action OnParachuteOpened;
|
||||
event Action OnParachuteClosed;
|
||||
}
|
||||
|
||||
}
|
@@ -1,71 +0,0 @@
|
||||
using Unity.Mathematics;
|
||||
|
||||
namespace BITFALL.Player.Movement
|
||||
{
|
||||
public struct PlayerCancelRunCommand{}
|
||||
public struct PlayerDisableRunCommand
|
||||
{
|
||||
public readonly object Lock;
|
||||
public PlayerDisableRunCommand(object @lock)
|
||||
{
|
||||
Lock = @lock;
|
||||
}
|
||||
}
|
||||
|
||||
public struct PlayerPauseRunCommand
|
||||
|
||||
{
|
||||
public readonly bool Pause;
|
||||
public readonly object Lock;
|
||||
|
||||
public PlayerPauseRunCommand(object @lock, bool pause)
|
||||
{
|
||||
Lock = @lock;
|
||||
Pause = pause;
|
||||
}
|
||||
}
|
||||
public struct PlayerEnableRunCommand
|
||||
{
|
||||
public readonly object Lock;
|
||||
public PlayerEnableRunCommand(object @lock)
|
||||
{
|
||||
Lock = @lock;
|
||||
}
|
||||
}
|
||||
public struct PlayerLimitMoveSpeedCommand
|
||||
{
|
||||
public bool Limit;
|
||||
public int Id;
|
||||
public float Speed;
|
||||
}
|
||||
public struct PlayerLimitSensitivityCommand
|
||||
{
|
||||
public bool Limit;
|
||||
public int Id;
|
||||
public float Sensitivity;
|
||||
}
|
||||
public struct PlayerChangeVelocityCommand
|
||||
{
|
||||
public float3 Velocity;
|
||||
public float3 Damping;
|
||||
}
|
||||
public struct PlayerFocusCommand
|
||||
{
|
||||
public bool Focus;
|
||||
public object Sender;
|
||||
}
|
||||
public struct PlayerAddGravityDampingCommand
|
||||
{
|
||||
public float Damping;
|
||||
}
|
||||
public struct PlayerDisableMovementCommand
|
||||
{
|
||||
public object LockFile;
|
||||
public string Source;
|
||||
public bool Disable;
|
||||
public float Duration;
|
||||
}
|
||||
public struct OnPlayerJumpCommand{}
|
||||
public struct OnPlayerLandCommand{}
|
||||
}
|
||||
|
@@ -1,56 +0,0 @@
|
||||
using Unity.Mathematics;
|
||||
|
||||
namespace BITFALL.Player.Movement
|
||||
{
|
||||
public interface IPlayerMovementState{}
|
||||
public interface IPlayerRunState{}
|
||||
public interface IPlayerWalkState{}
|
||||
public interface IPlayerCrawlState{}
|
||||
|
||||
public interface IPlayerVaultState
|
||||
{
|
||||
bool ManualCancel();
|
||||
}
|
||||
|
||||
public interface IPlayerClimbState
|
||||
{
|
||||
bool ManualCancel();
|
||||
}
|
||||
|
||||
public interface IPlayerEdgeClimbState
|
||||
{
|
||||
public int Phase { get; set; }
|
||||
float3 CurrentPoint { get; }
|
||||
float3 NextPoint { get; }
|
||||
bool ManualCancel();
|
||||
float3[] ClosestPoint { get; }
|
||||
}
|
||||
|
||||
public interface IPlayerLinkState
|
||||
{
|
||||
public int LinkArea { get; }
|
||||
}
|
||||
public interface IPlayerCrouchState{}
|
||||
public interface IPlayerSprintState{}
|
||||
public interface IPlayerKnockdownState{}
|
||||
public interface IPlayerSlideState{}
|
||||
public interface IPlayerParachuteState{}
|
||||
|
||||
public interface IPlayerDodgeState
|
||||
{
|
||||
bool ManualCancel();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Fixed state is a state that is not affected by movement input,like drive a car or ride a bike or sit on a chair
|
||||
/// </summary>
|
||||
public interface IPlayerFixedState
|
||||
{
|
||||
public object FixedObject { get; }
|
||||
public float3 FixedPosition { get; }
|
||||
public quaternion FixedRotation { get; }
|
||||
public float3 FixedLocalPosition { get; }
|
||||
public quaternion FixedLocalRotation { get; }
|
||||
}
|
||||
public interface IPlayerAnimationState{}
|
||||
}
|
@@ -1,21 +0,0 @@
|
||||
{
|
||||
"name": "BITFALL.Player.Survival",
|
||||
"rootNamespace": "",
|
||||
"references": [
|
||||
"GUID:14fe60d984bf9f84eac55c6ea033a8f4",
|
||||
"GUID:709caf8d7fb6ef24bbba0ab9962a3ad0",
|
||||
"GUID:d525ad6bd40672747bde77962f1c401e",
|
||||
"GUID:49b49c76ee64f6b41bf28ef951cb0e50",
|
||||
"GUID:f51ebe6a0ceec4240a699833d6309b23",
|
||||
"GUID:d8b63aba1907145bea998dd612889d6b"
|
||||
],
|
||||
"includePlatforms": [],
|
||||
"excludePlatforms": [],
|
||||
"allowUnsafeCode": false,
|
||||
"overrideReferences": false,
|
||||
"precompiledReferences": [],
|
||||
"autoReferenced": true,
|
||||
"defineConstraints": [],
|
||||
"versionDefines": [],
|
||||
"noEngineReferences": false
|
||||
}
|
@@ -1,50 +0,0 @@
|
||||
using Unity.Mathematics;
|
||||
using System;
|
||||
|
||||
namespace BITFALL.Player.Survival
|
||||
{
|
||||
public interface IPlayerSurvivalService
|
||||
{
|
||||
IPlayerSurvivalElement[] Elements { get; }
|
||||
}
|
||||
/// <summary>
|
||||
/// 玩家生存接口
|
||||
/// </summary>
|
||||
public interface IPlayerSurvivalElement
|
||||
{
|
||||
string Name { get; }
|
||||
public float Value { get; set; }
|
||||
public float Decay { get; }
|
||||
event Action<float> OnValueChanged;
|
||||
}
|
||||
public abstract class PlayerSurvivalElement:IPlayerSurvivalElement{
|
||||
public virtual string Name=>GetType().Name;
|
||||
private float _value = 100;
|
||||
|
||||
public float Value {
|
||||
get => _value;
|
||||
set
|
||||
{
|
||||
value = math.clamp(value, 0, 100);
|
||||
OnValueChanged?.Invoke(value);
|
||||
_value = value;
|
||||
}
|
||||
}
|
||||
public virtual float Decay => 1;
|
||||
public event Action<float> OnValueChanged;
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public sealed class PlayerSurvivalHunger : PlayerSurvivalElement
|
||||
{
|
||||
public override string Name => "饥饿值";
|
||||
public override float Decay => 0.08f;
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public sealed class PlayerSurvivalThirst : PlayerSurvivalElement
|
||||
{
|
||||
public override string Name => "口渴值";
|
||||
public override float Decay => 0.16f;
|
||||
}
|
||||
}
|
@@ -1,34 +0,0 @@
|
||||
|
||||
using System;
|
||||
using BITKit;
|
||||
#if UNITY_5_3_OR_NEWER
|
||||
using UnityEngine;
|
||||
#endif
|
||||
|
||||
#if NETCOREAPP
|
||||
#else
|
||||
namespace BITFALL.Player.Survival
|
||||
{
|
||||
public abstract class PlayerEatAdd:IProperty
|
||||
{
|
||||
[SerializeField] private int value;
|
||||
public int Value => value;
|
||||
}
|
||||
[Serializable]
|
||||
public class PlayerEatAddHunger:PlayerEatAdd{}
|
||||
[Serializable]
|
||||
public class PlayerEatAddThirst:PlayerEatAdd{}
|
||||
[Serializable]
|
||||
public class PlayerEatAddHealth:PlayerEatAdd{}
|
||||
[Serializable]
|
||||
public class PlayerEatAddStamina:PlayerEatAdd{}
|
||||
[Serializable]
|
||||
public class PlayerEatAddEnergy:PlayerEatAdd{}
|
||||
[Serializable]
|
||||
public class PlayerEatAddSanity:PlayerEatAdd{}
|
||||
[Serializable]
|
||||
public class PlayerEatAddTemperature:PlayerEatAdd{}
|
||||
[Serializable]
|
||||
public class PlayerEatAddWetness:PlayerEatAdd{}
|
||||
}
|
||||
#endif
|
@@ -1,17 +0,0 @@
|
||||
{
|
||||
"name": "BITFALL.Props",
|
||||
"rootNamespace": "",
|
||||
"references": [
|
||||
"GUID:14fe60d984bf9f84eac55c6ea033a8f4",
|
||||
"GUID:f6155d9ae143f3949ac54e8355593d6c"
|
||||
],
|
||||
"includePlatforms": [],
|
||||
"excludePlatforms": [],
|
||||
"allowUnsafeCode": false,
|
||||
"overrideReferences": false,
|
||||
"precompiledReferences": [],
|
||||
"autoReferenced": true,
|
||||
"defineConstraints": [],
|
||||
"versionDefines": [],
|
||||
"noEngineReferences": false
|
||||
}
|
@@ -1,11 +0,0 @@
|
||||
using System;
|
||||
|
||||
namespace BITFALL.Props
|
||||
{
|
||||
public interface IStunObject
|
||||
{
|
||||
float Weight { get; }
|
||||
event Action<float> OnWeightChanged;
|
||||
void Stun(float distance, float duration);
|
||||
}
|
||||
}
|
@@ -1,17 +0,0 @@
|
||||
{
|
||||
"name": "BITFALL.Scene",
|
||||
"rootNamespace": "",
|
||||
"references": [
|
||||
"GUID:14fe60d984bf9f84eac55c6ea033a8f4",
|
||||
"GUID:d8b63aba1907145bea998dd612889d6b"
|
||||
],
|
||||
"includePlatforms": [],
|
||||
"excludePlatforms": [],
|
||||
"allowUnsafeCode": false,
|
||||
"overrideReferences": false,
|
||||
"precompiledReferences": [],
|
||||
"autoReferenced": true,
|
||||
"defineConstraints": [],
|
||||
"versionDefines": [],
|
||||
"noEngineReferences": true
|
||||
}
|
@@ -1,78 +0,0 @@
|
||||
using System;
|
||||
using BITKit;
|
||||
using BITKit.Entities;
|
||||
|
||||
namespace BITFALL.Scene
|
||||
{
|
||||
/// <summary>
|
||||
/// 互动模式
|
||||
/// </summary>
|
||||
public interface IActionMode{}
|
||||
/// <summary>
|
||||
/// 长按互动
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public struct HoldAction:IActionMode{}
|
||||
/// <summary>
|
||||
/// 快速点击互动
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public struct QuickTapAction:IActionMode{}
|
||||
/// <summary>
|
||||
/// 自定义互动,此时需要自定义互动逻辑
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public struct CustomAction:IActionMode{}
|
||||
|
||||
/// <summary>
|
||||
/// 基于行为的道具,通常是与地图上的道具互动,例如安装设备,打开门
|
||||
/// 通常是自定义逻辑,玩家本身只需要锁定(或者覆盖)
|
||||
/// </summary>
|
||||
public interface IActionBasedObject
|
||||
{
|
||||
/// <summary>
|
||||
/// 互动模式
|
||||
/// </summary>
|
||||
IActionMode ActionMode { get; }
|
||||
/// <summary>
|
||||
/// 当前互动的实体
|
||||
/// </summary>
|
||||
IEntity Entity { get; }
|
||||
/// <summary>
|
||||
/// 已运行时间
|
||||
/// </summary>
|
||||
float ElapsedTime { get; }
|
||||
|
||||
/// <summary>
|
||||
/// 开始互动,可以在上下文抛出异常<see cref="InGameException"/>
|
||||
/// </summary>
|
||||
event Action OnStarted;
|
||||
/// <summary>
|
||||
/// 互动进行中,可以在上下文抛出异常<see cref="InGameException"/>
|
||||
/// </summary>
|
||||
event Action<float> OnTick;
|
||||
/// <summary>
|
||||
/// 互动完成
|
||||
/// </summary>
|
||||
event Action OnCompleted;
|
||||
/// <summary>
|
||||
/// 互动取消
|
||||
/// </summary>
|
||||
event Action OnCanceled;
|
||||
|
||||
/// <summary>
|
||||
/// 进入互动
|
||||
/// </summary>
|
||||
/// <param name="entity">发起互动的实体</param>
|
||||
void Entry(IEntity entity);
|
||||
/// <summary>
|
||||
/// 取消互动
|
||||
/// </summary>
|
||||
void Cancel();
|
||||
/// <summary>
|
||||
/// 开始互动的轮训函数,所有函数返回完成或者空函数为完成
|
||||
/// </summary>
|
||||
event Func<bool> IsCompletedFactory;
|
||||
}
|
||||
|
||||
}
|
@@ -1,11 +0,0 @@
|
||||
using Unity.Mathematics;
|
||||
|
||||
namespace BITFALL.Scene
|
||||
{
|
||||
public interface ISceneBlockArea
|
||||
{
|
||||
bool IsBlocked { get; }
|
||||
bool InRange(float3 position);
|
||||
bool InRange(float3 position,float3 direction);
|
||||
}
|
||||
}
|
@@ -1,10 +0,0 @@
|
||||
using BITKit.Entities;
|
||||
using Unity.Mathematics;
|
||||
|
||||
namespace BITFALL.Scene
|
||||
{
|
||||
public interface IScenePlayerImpact
|
||||
{
|
||||
void OnPlayerImpact(IEntity entity,float4x4 matrix);
|
||||
}
|
||||
}
|
@@ -1,17 +0,0 @@
|
||||
using Unity.Mathematics;
|
||||
|
||||
namespace BITFALL.Scene
|
||||
{
|
||||
public interface ISpawnPointService
|
||||
{
|
||||
public float4x4 RequestSpawnPoint(params object[] tags);
|
||||
}
|
||||
public abstract class SpawnPointServiceImplement : ISpawnPointService
|
||||
{
|
||||
protected abstract ISpawnPointService _spawnPointServiceImplementation { get; }
|
||||
public float4x4 RequestSpawnPoint(params object[] tags)
|
||||
{
|
||||
return _spawnPointServiceImplementation.RequestSpawnPoint(tags);
|
||||
}
|
||||
}
|
||||
}
|
@@ -1,29 +0,0 @@
|
||||
namespace BITFALL.Sensors
|
||||
{
|
||||
/// <summary>
|
||||
/// 枪声噪音
|
||||
/// </summary>
|
||||
public struct GunShootNoise
|
||||
{
|
||||
/// <summary>
|
||||
/// 是否使用消音器
|
||||
/// </summary>
|
||||
public bool IsSilent;
|
||||
}
|
||||
/// <summary>
|
||||
/// 运动噪音,通常是脚步声
|
||||
/// </summary>
|
||||
public struct MovementNoise{}
|
||||
/// <summary>
|
||||
/// 爆炸爆音,可无视遮挡物
|
||||
/// </summary>
|
||||
public struct ExplosionNoise{}
|
||||
/// <summary>
|
||||
/// 警报噪音,会源源不断的发出
|
||||
/// </summary>
|
||||
public struct AlertNoise{}
|
||||
/// <summary>
|
||||
/// 撞击噪音,通常为物体撞击或者子弹撞击等
|
||||
/// </summary>
|
||||
public struct ImpactNoise{}
|
||||
}
|
@@ -1,17 +0,0 @@
|
||||
{
|
||||
"name": "BITFALL.AudioNoises",
|
||||
"rootNamespace": "",
|
||||
"references": [
|
||||
"GUID:14fe60d984bf9f84eac55c6ea033a8f4",
|
||||
"GUID:87bea3a21c744b1478660b70494160ba"
|
||||
],
|
||||
"includePlatforms": [],
|
||||
"excludePlatforms": [],
|
||||
"allowUnsafeCode": false,
|
||||
"overrideReferences": false,
|
||||
"precompiledReferences": [],
|
||||
"autoReferenced": true,
|
||||
"defineConstraints": [],
|
||||
"versionDefines": [],
|
||||
"noEngineReferences": true
|
||||
}
|
@@ -1,3 +0,0 @@
|
||||
{
|
||||
"name": "BITFALL.Stealth"
|
||||
}
|
@@ -1,18 +0,0 @@
|
||||
{
|
||||
"name": "BITFALL.Trading",
|
||||
"rootNamespace": "",
|
||||
"references": [
|
||||
"GUID:14fe60d984bf9f84eac55c6ea033a8f4",
|
||||
"GUID:677cd05ca06c46b4395470200b1acdad",
|
||||
"GUID:f51ebe6a0ceec4240a699833d6309b23"
|
||||
],
|
||||
"includePlatforms": [],
|
||||
"excludePlatforms": [],
|
||||
"allowUnsafeCode": false,
|
||||
"overrideReferences": false,
|
||||
"precompiledReferences": [],
|
||||
"autoReferenced": true,
|
||||
"defineConstraints": [],
|
||||
"versionDefines": [],
|
||||
"noEngineReferences": true
|
||||
}
|
@@ -1,32 +0,0 @@
|
||||
using BITKit;
|
||||
|
||||
namespace BITFALL.Trading
|
||||
{
|
||||
/// <summary>
|
||||
/// 交易员
|
||||
/// </summary>
|
||||
public interface ITrader
|
||||
{
|
||||
/// <summary>
|
||||
/// 你的额度
|
||||
/// </summary>
|
||||
int Credit { get; }
|
||||
/// <summary>
|
||||
/// 交易员提供的物品
|
||||
/// </summary>
|
||||
IBasicItem[] Items { get; }
|
||||
/// <summary>
|
||||
/// 交易
|
||||
/// </summary>
|
||||
/// <param name="priceItems">你提供的物品</param>
|
||||
/// <param name="tradeItems">交易的物品</param>
|
||||
void Trade(IBasicItem[] priceItems, IBasicItem[] tradeItems);
|
||||
/// <summary>
|
||||
/// 是否可以交易
|
||||
/// </summary>
|
||||
/// <param name="priceItems">你提供的物品</param>
|
||||
/// <param name="tradeItems">交易的物品</param>
|
||||
/// <returns>是否可以交易</returns>
|
||||
bool AllowTrade(IBasicItem[] priceItems, IBasicItem[] tradeItems);
|
||||
}
|
||||
}
|
@@ -1,16 +0,0 @@
|
||||
{
|
||||
"name": "BITFALL.World",
|
||||
"rootNamespace": "",
|
||||
"references": [
|
||||
"GUID:87bea3a21c744b1478660b70494160ba"
|
||||
],
|
||||
"includePlatforms": [],
|
||||
"excludePlatforms": [],
|
||||
"allowUnsafeCode": false,
|
||||
"overrideReferences": false,
|
||||
"precompiledReferences": [],
|
||||
"autoReferenced": true,
|
||||
"defineConstraints": [],
|
||||
"versionDefines": [],
|
||||
"noEngineReferences": true
|
||||
}
|
@@ -1,4 +0,0 @@
|
||||
|
||||
|
||||
|
||||
|
@@ -1,31 +0,0 @@
|
||||
{
|
||||
"name": "BITKit",
|
||||
"rootNamespace": "",
|
||||
"references": [
|
||||
"GUID:75469ad4d38634e559750d17036d5f7c",
|
||||
"GUID:66d2ae14764cc7d49aad4b16930747c0",
|
||||
"GUID:49b49c76ee64f6b41bf28ef951cb0e50",
|
||||
"GUID:e6234d6c1f7bf4e4db20eddc411c00b8",
|
||||
"GUID:15fc0a57446b3144c949da3e2b9737a9",
|
||||
"GUID:f51ebe6a0ceec4240a699833d6309b23",
|
||||
"GUID:4307f53044263cf4b835bd812fc161a4",
|
||||
"GUID:df380645f10b7bc4b97d4f5eb6303d95",
|
||||
"GUID:d8b63aba1907145bea998dd612889d6b",
|
||||
"GUID:d525ad6bd40672747bde77962f1c401e",
|
||||
"GUID:e34a5702dd353724aa315fb8011f08c3",
|
||||
"GUID:4988cf9794f41d64c884876ab6574b89",
|
||||
"GUID:e0cd26848372d4e5c891c569017e11f1",
|
||||
"GUID:517785bb4600a5140b47eac5fa49b8fc",
|
||||
"GUID:a11ff146d38b27a44af87b4b4d9c4ecb",
|
||||
"GUID:8c1b5e158961445498f8a66188fbb2e3"
|
||||
],
|
||||
"includePlatforms": [],
|
||||
"excludePlatforms": [],
|
||||
"allowUnsafeCode": true,
|
||||
"overrideReferences": false,
|
||||
"precompiledReferences": [],
|
||||
"autoReferenced": true,
|
||||
"defineConstraints": [],
|
||||
"versionDefines": [],
|
||||
"noEngineReferences": false
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user