Skip to content

Commit

Permalink
recovery
Browse files Browse the repository at this point in the history
  • Loading branch information
lyt0628 committed Dec 17, 2024
1 parent cfca4f6 commit b577760
Show file tree
Hide file tree
Showing 103 changed files with 1,889 additions and 558 deletions.
Empty file removed docs/art/effect-spec.org
Empty file.
Empty file removed docs/art/model-spec.org
Empty file.
Binary file removed docs/assets/architecture-component.png
Binary file not shown.
Binary file removed docs/assets/combat-classes.png
Binary file not shown.
Binary file removed docs/assets/combat-computing.png
Binary file not shown.
Binary file removed docs/assets/damage-computing.png
Binary file not shown.
4 changes: 0 additions & 4 deletions docs/index.org

This file was deleted.

65 changes: 0 additions & 65 deletions docs/prog/architecture.org

This file was deleted.

28 changes: 0 additions & 28 deletions docs/prog/combat-module.org

This file was deleted.

Empty file removed docs/prog/gamelib-view.org
Empty file.
Empty file removed docs/prog/gamelib.org
Empty file.
Empty file removed docs/prog/interact-module.org
Empty file.
Empty file removed docs/prog/inventory-module.org
Empty file.
Empty file removed docs/prog/modules.org
Empty file.
Empty file removed docs/prog/naming-rule.org
Empty file.
Empty file removed docs/prog/plot-module.org
Empty file.
Binary file removed docs/资源清单.docx
Binary file not shown.
Binary file removed docs/项目定义和约定.docx
Binary file not shown.
2 changes: 1 addition & 1 deletion src/.vs/Assembly-CSharp-Editor.csproj.dtbcache.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/.vs/QS.Chara.csproj.dtbcache.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/.vs/QS.Deps.csproj.dtbcache.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/.vs/QS.Executor.csproj.dtbcache.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/.vs/QS.Skill.csproj.dtbcache.json

Large diffs are not rendered by default.

Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
635 changes: 571 additions & 64 deletions src/.vs/src/v17/DocumentLayout.backup.json

Large diffs are not rendered by default.

627 changes: 553 additions & 74 deletions src/.vs/src/v17/DocumentLayout.json

Large diffs are not rendered by default.

Binary file modified src/.vs/src/v17/fileList.bin
Binary file not shown.
2 changes: 2 additions & 0 deletions src/Assets/Conf/Common/FXMountPositions.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# 这个配置文件用来定义特效挂载点

7 changes: 7 additions & 0 deletions src/Assets/Conf/Common/FXMountPositions.toml.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions src/Assets/Conf/Common/ItemMountPositions.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# 这个配置文件用来定义物体挂载点, 包括 Weapon, Seal, Prop, Assory...
[[item_mount_positions]] # 挂载点同样是一个简单的表数组
id = 'LHand' # Id 用来被具体的物体引用, 来确定位置
position= 'UpperArm.L' # 挂载的位置是具体的父骨骼名称, 这个遵从Unity基本重定向的那几个骨骼, 当然动画会拓展, 但是要求基本的几个骨骼都要有, 名称约定好就是这个. 项目使用Blender作为模型工具, 这个左右规范跟着Blender来就好
offset = [3, 22, 1] # 三元组来定义Offset xyz
7 changes: 7 additions & 0 deletions src/Assets/Conf/Common/ItemMountPositions.toml.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 5 additions & 6 deletions src/Assets/Conf/Skill/SimpleSkillAssets.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,12 @@ name = 'FireBall' # 必须指定
[[skill_asset.precast.enter.prefab]] # 需要被实例化的 prefab 是一个表数组
key = 'BD' # 用于加载资源的Key, 这个需要进一步约定
static = false # 是否这个 prefab 生成在 玩家的 局部空间(会跟随玩家移动), true的话, 生成后就不在移动了, 默认是true
auto_destoye = 3.3 # 需不需要 程序帮忙销毁这个prefab, 单位是秒, 不指定就是0, 表示程序就不帮忙干活
auto_destroye = 3.3 # 需不需要 程序帮忙销毁这个prefab, 单位是秒, 不指定就是0, 表示程序就不帮忙干活
[skill_asset.precast.enter.prefab.mount] # 挂载点子表 不指定就是在角色原点的位置
position = 'FX_LHand' # 预定义好的挂载点的名称
x_offset = 3.3 # 允许指定一定程度的偏移, 如果偏差太多, 可以酌情联系程序进行挂载点的增加
y_offset = 0 # 这些偏移的默认值都是 0
z_offset = 0
x_rotation = 10 # 用欧拉角指定旋转 注意. 动态的效果请联系程序帮忙写脚本
position = 'FX_LHand' # 预定义好的挂载点的名称, 模型挂载和特效挂载要分开, 要求特效都以 FX_开头, 模型以 M_ 开头
offset = [3, 5, 8] # 用xyz 三元组来定义 偏移量
rotation = [10, 30, 55] # 用欧拉角指定旋转 注意. 动态的效果请联系程序帮忙写脚本


# Casting
[skill_asset.precast]
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@


using QS.Api.Combat.Domain;
using QS.Api.Executor.Domain;

namespace QS.Api.Character.Instruction
namespace QS.Api.Chara.Instruction
{
public interface IInjuredInstruction : IInstruction
{
float Atk { get; }
float Matk { get; }
IAttack Attack { get; }
}
}
5 changes: 3 additions & 2 deletions src/Assets/Script/Chara/Api/ICharacter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,16 @@



namespace QS.Api.Character
namespace QS.Api.Chara
{
/// <summary>
/// 角色是游戏中的核心定义, 它表示领域而不是实现,
/// 实现是由Executor 承担, Executor 不涉及领域, 因而可以轻松拓展
/// 现在专注于描述领域 角色会使用技能,但技能本身与角色不耦合
/// 技能只是一个特别的Handler能处理一些技能指令
/// </summary>
public interface ICharacter : IRelayExecutor, IMessagerProvider, IAnimAware
public interface ICharacter
: IRelayExecutor, IMessagerProvider, IAnimAware
{

}
Expand Down
8 changes: 2 additions & 6 deletions src/Assets/Script/Chara/Api/Service/ICharaAblityFactory.cs
Original file line number Diff line number Diff line change
@@ -1,15 +1,11 @@



using QS.Api.Character.Instruction;
using QS.Api.Combat.Domain;
using QS.Api.Executor.Domain;
using QS.GameLib.Pattern.Pipeline;

namespace QS.Api.Character.Service
namespace QS.Api.Chara.Service
{
public interface ICharaAblityFactory
{
IInstructionHandler Injured(IRelayExecutor executor,IInjurable injurable);
IInstructionHandler Injured(IRelayExecutor executor, IInjurable injurable);
}
}
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@



using QS.Api.Combat.Domain;
using QS.Api.Executor.Domain;
using QS.Chara.Domain.Instruction;

namespace QS.Api.Character.Service
namespace QS.Api.Chara.Service
{
public interface ICharaInsrFactory
{
IInstruction Injured(float atk, float matk);
IInstruction Injured(IAttack attack);
}
}
20 changes: 0 additions & 20 deletions src/Assets/Script/Chara/Api/Service/ICharacterBuilder.cs

This file was deleted.

2 changes: 1 addition & 1 deletion src/Assets/Script/Chara/CharaGlobal.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@


using GameLib.DI;
using QS.Api.Character.Service;
using QS.Api.Chara.Service;
using QS.Api.Common;
using QS.Chara.Service;
using QS.Combat;
Expand Down
48 changes: 3 additions & 45 deletions src/Assets/Script/Chara/Domain/Character.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
using GameLib.DI;
using QS.Api.Character;
using QS.Api.Chara;
using QS.Api.Common;
using QS.Api.Executor.Domain;
using QS.Executor;
using QS.GameLib.Pattern.Message;
using QS.GameLib.Pattern.Pipeline;
using QS.GameLib.Rx.Relay;
Expand All @@ -13,11 +14,9 @@

namespace QS.Chara.Domain
{
public class Character : MonoBehaviour, ICharacter
public class Character : ExecutorBehaviour, ICharacter
{

[Injected]
readonly IRelayExecutor executor;

[Injected(Name =Api.Common.DINames.GameLib_Message_Messager)]
readonly IMessager _messager;
Expand All @@ -31,47 +30,6 @@ void Start()
public void AnimAware(string param)
{
Messager.Boardcast(param, Msg0.Instance);
Debug.Log(param);
}

public void Execute(Relay<IInstruction> instructions)
{
executor.Execute(instructions);
}

public void Execute(IInstruction instruction)
{
executor.Execute(instruction);
}

public void AddFirst(string name, IInstructionHandler handler)
{
executor.AddFirst(name, handler);
}

public void AddLast(string name, IInstructionHandler handler)
{
executor.AddLast(name, handler);
}

public void AddBefore(string baseName, string name, IInstructionHandler handler)
{
executor.AddBefore(baseName, name, handler);
}

public void AddAfter(string baseName, string name, IInstructionHandler handler)
{
executor.AddAfter(baseName, name, handler);
}

public void Remove(string name)
{
executor.Remove(name);
}

public void Remove(IInstructionHandler handler)
{
executor.Remove(handler);
}
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
using GameLib.DI;
using QS.Api.Character.Instruction;
using QS.Api.Chara.Instruction;
using QS.Api.Combat.Domain;
using QS.Api.Combat.Service;
using QS.Api.Executor.Domain;
Expand All @@ -22,8 +22,6 @@ namespace QS.Chara.Domain.Handler
/// </summary>
public class InjuredInstructionHandler : AbstractHandler
{
[Injected]
readonly IAttackFactory attackFactory;

readonly IInjurable injurable;

Expand All @@ -42,8 +40,7 @@ public override void Read(IPipelineHandlerContext context, object msg)
}

var i = (IInjuredInstruction)msg;

injurable.Injured(attackFactory.NewAttack(i.Atk, i.Matk));
injurable.Injured(i.Attack);
}
}
}
16 changes: 10 additions & 6 deletions src/Assets/Script/Chara/Domain/Instruction/InjuredInstr.cs
Original file line number Diff line number Diff line change
@@ -1,21 +1,25 @@



using QS.Api.Character.Instruction;
using QS.Api.Chara.Instruction;
using QS.Api.Combat.Domain;
using QS.Api.Combat.Service;

namespace QS.Chara.Domain.Instruction
{
class InjuredInstr : IInjuredInstruction
{
public InjuredInstr(float atk, float matk)
{
Atk = atk;
Matk = matk;
var atkFactory = CharaGlobal.Instance.GetInstance<IAttackFactory>();
Attack = atkFactory.NewAttack(atk, matk);
}
public InjuredInstr(IAttack attack)
{
Attack = attack;
}

public float Atk { get; }

public float Matk { get; }
public IAttack Attack { get; }
}

}
3 changes: 1 addition & 2 deletions src/Assets/Script/Chara/Service/CharaAblityFactory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@


using GameLib.DI;
using QS.Api.Character.Instruction;
using QS.Api.Character.Service;
using QS.Api.Chara.Service;
using QS.Api.Combat.Domain;
using QS.Api.Executor.Domain;
using QS.Chara.Domain.Handler;
Expand Down
Loading

0 comments on commit b577760

Please sign in to comment.