1
This commit is contained in:
@@ -2,6 +2,7 @@ using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using BITKit;
|
||||
|
||||
namespace BITFALL
|
||||
{
|
||||
@@ -9,6 +10,7 @@ namespace BITFALL
|
||||
{
|
||||
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);
|
||||
@@ -26,7 +28,9 @@ namespace BITFALL
|
||||
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);
|
||||
@@ -68,6 +72,16 @@ namespace BITFALL
|
||||
|
||||
}
|
||||
}
|
||||
public static class Environment
|
||||
{
|
||||
/// <summary>
|
||||
/// bot数量
|
||||
/// </summary>
|
||||
public const string bot_quota = nameof(bot_quota);
|
||||
/// <summary>
|
||||
/// 复活时间,-1为不复活
|
||||
/// </summary>
|
||||
public const string mp_respawn_on_death = nameof(mp_respawn_on_death);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -1,3 +1,4 @@
|
||||
{
|
||||
"name": "BITFALL"
|
||||
"name": "BITFALL",
|
||||
"references":[ "GUID:14fe60d984bf9f84eac55c6ea033a8f4" ]
|
||||
}
|
||||
|
58
Assets/BITFALL/BITHash.cs
Normal file
58
Assets/BITFALL/BITHash.cs
Normal file
@@ -0,0 +1,58 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
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 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);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@@ -9,14 +9,16 @@ namespace BITFALL
|
||||
{
|
||||
public record SpawnBullet : INetMessage
|
||||
{
|
||||
public ulong initiator;
|
||||
public float3 pos;
|
||||
public quaternion rot;
|
||||
public float3 forward;
|
||||
public uint Token;
|
||||
public ulong Initiator;
|
||||
public float3 Position;
|
||||
public quaternion Rotation;
|
||||
public float3 Forward;
|
||||
public float CreateTime = BITApp.Time.DeltaTime;
|
||||
public int InitialForce;
|
||||
public int startSpeed;
|
||||
public int initialDamage;
|
||||
public int StartSpeed;
|
||||
public int MaxDamage;
|
||||
public int InitialDamage;
|
||||
}
|
||||
public class SpawnBulletSupport : NetMessageReader<SpawnBullet>
|
||||
{
|
||||
@@ -24,21 +26,21 @@ namespace BITFALL
|
||||
{
|
||||
return new SpawnBullet
|
||||
{
|
||||
initiator = reader.ReadUInt32(),
|
||||
pos = reader.ReadFloat3(),
|
||||
rot = reader.ReadQuaternion(),
|
||||
forward = reader.ReadFloat3(),
|
||||
startSpeed = reader.ReadInt32(),
|
||||
Initiator = reader.ReadUInt32(),
|
||||
Position = reader.ReadFloat3(),
|
||||
Rotation = reader.ReadQuaternion(),
|
||||
Forward = reader.ReadFloat3(),
|
||||
StartSpeed = reader.ReadInt32(),
|
||||
};
|
||||
}
|
||||
|
||||
public override void WriteBinary(BinaryWriter writer, SpawnBullet value)
|
||||
{
|
||||
writer.Write(value.initiator);
|
||||
writer.WriteFloat3(value.pos);
|
||||
writer.WriteQuaternion(value.rot);
|
||||
writer.WriteFloat3(value.forward);
|
||||
writer.Write(value.startSpeed);
|
||||
writer.Write(value.Initiator);
|
||||
writer.WriteFloat3(value.Position);
|
||||
writer.WriteQuaternion(value.Rotation);
|
||||
writer.WriteFloat3(value.Forward);
|
||||
writer.Write(value.StartSpeed);
|
||||
}
|
||||
}
|
||||
}
|
@@ -13,6 +13,7 @@ namespace BITKit.Game
|
||||
/// </summary>
|
||||
public interface IGameService:IStateMachine<IGameState>
|
||||
{
|
||||
string ExpectMap { get; set; }
|
||||
void Play();
|
||||
void Stop();
|
||||
}
|
||||
@@ -66,6 +67,12 @@ namespace BITKit.Game
|
||||
service.TransitionState(state);
|
||||
}
|
||||
|
||||
public string ExpectMap
|
||||
{
|
||||
get => _gameServiceImplementation.ExpectMap;
|
||||
set => _gameServiceImplementation.ExpectMap = value;
|
||||
}
|
||||
|
||||
public void Play()
|
||||
{
|
||||
_gameServiceImplementation.Play();
|
||||
|
@@ -14,6 +14,9 @@ namespace BITKit.Entities.Melee
|
||||
public float3 Force;
|
||||
public float Range;
|
||||
public int Damage;
|
||||
public int Limit;
|
||||
public string[] IgnoreTags;
|
||||
public bool ForceHitStun;
|
||||
}
|
||||
public interface IMeleeService
|
||||
{
|
||||
|
17
Assets/BITFALL/Placement/BITFALL.Placement.asmdef
Normal file
17
Assets/BITFALL/Placement/BITFALL.Placement.asmdef
Normal file
@@ -0,0 +1,17 @@
|
||||
{
|
||||
"name": "BITFALL.Placement",
|
||||
"rootNamespace": "",
|
||||
"references": [
|
||||
"GUID:14fe60d984bf9f84eac55c6ea033a8f4",
|
||||
"GUID:d8b63aba1907145bea998dd612889d6b"
|
||||
],
|
||||
"includePlatforms": [],
|
||||
"excludePlatforms": [],
|
||||
"allowUnsafeCode": false,
|
||||
"overrideReferences": false,
|
||||
"precompiledReferences": [],
|
||||
"autoReferenced": true,
|
||||
"defineConstraints": [],
|
||||
"versionDefines": [],
|
||||
"noEngineReferences": true
|
||||
}
|
15
Assets/BITFALL/Placement/IPlacementObject.cs
Normal file
15
Assets/BITFALL/Placement/IPlacementObject.cs
Normal file
@@ -0,0 +1,15 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using Unity.Mathematics;
|
||||
|
||||
namespace BITFALL.Placement
|
||||
{
|
||||
public interface IPlacementObject
|
||||
{
|
||||
float PositionIncrement { get; }
|
||||
int RotationIncrement { get; }
|
||||
int3 Size { get; }
|
||||
IPlacementObject CreateInstance();
|
||||
}
|
||||
|
||||
}
|
14
Assets/BITFALL/Placement/IPlacementService.cs
Normal file
14
Assets/BITFALL/Placement/IPlacementService.cs
Normal file
@@ -0,0 +1,14 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
namespace BITFALL.Placement
|
||||
{
|
||||
public interface IPlacementService
|
||||
{
|
||||
IPlacementObject[] PlacementObjects { get; }
|
||||
}
|
||||
public abstract class PlacementServiceImplementation : IPlacementService
|
||||
{
|
||||
protected abstract IPlacementService _placementServiceImplementation { get; }
|
||||
public IPlacementObject[] PlacementObjects => _placementServiceImplementation.PlacementObjects;
|
||||
}
|
||||
}
|
@@ -9,6 +9,7 @@ namespace BITFALL.Player.Equip
|
||||
float Stable { get; set; }
|
||||
bool AllowAttack { get; set; }
|
||||
bool AllowScope { get; set; }
|
||||
IValidHandle AllowEquip { get; }
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -11,6 +11,19 @@ namespace BITFALL.Player.Movement
|
||||
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;
|
||||
|
17
Assets/BITFALL/Scene/BITFALL.Scene.asmdef
Normal file
17
Assets/BITFALL/Scene/BITFALL.Scene.asmdef
Normal file
@@ -0,0 +1,17 @@
|
||||
{
|
||||
"name": "BITFALL.Scene",
|
||||
"rootNamespace": "",
|
||||
"references": [
|
||||
"GUID:14fe60d984bf9f84eac55c6ea033a8f4",
|
||||
"GUID:d8b63aba1907145bea998dd612889d6b"
|
||||
],
|
||||
"includePlatforms": [],
|
||||
"excludePlatforms": [],
|
||||
"allowUnsafeCode": false,
|
||||
"overrideReferences": false,
|
||||
"precompiledReferences": [],
|
||||
"autoReferenced": true,
|
||||
"defineConstraints": [],
|
||||
"versionDefines": [],
|
||||
"noEngineReferences": true
|
||||
}
|
19
Assets/BITFALL/Scene/ISpawnPointService.cs
Normal file
19
Assets/BITFALL/Scene/ISpawnPointService.cs
Normal file
@@ -0,0 +1,19 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user