临时提交 我困了睡觉了

This commit is contained in:
DESKTOP-5RP3AKU\Jisol
2024-10-19 04:39:43 +08:00
parent 1315802fa2
commit 44e2735899
20 changed files with 213 additions and 37 deletions

View File

@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: c0b4adcd267e40ce862cac6801946216
timeCreated: 1729283406

View File

@@ -0,0 +1,39 @@
using GAS.Runtime;
using GASSamples.Scripts.Game.GAS;
using JNGame.Runtime.Sync.System.Logic;
using JNGame.Sync.Entity.Component;
namespace GASSamples.Scripts.Game.Entity.Nodes.Component.Components
{
public class JNGASComponent : JNComponent
{
private GAbilitySystemComponent ASC = new ();
public override void OnSyncStart()
{
base.OnSyncStart();
//初始化ASC
GetSystem<JNGASSystem>().Register(ASC);
}
public void SetPreset(AbilitySystemComponentPreset ascPreset)
{
ASC.SetPreset(ascPreset);
}
public void SetLevel(int level)
{
ASC.SetLevel(level);
}
public override void OnSyncDestroy()
{
base.OnSyncDestroy();
//销毁ASC
GetSystem<JNGASSystem>().Unregister(ASC);
}
}
}

View File

@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: acdb37e4e7c0494084eed1be8171efc6
timeCreated: 1729283417

View File

@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: cef9fd36c2e54625bb161cf4062337b9
timeCreated: 1729282849

View File

@@ -0,0 +1,22 @@
using GASSamples.Scripts.Game.Entity.Nodes.Component.Components;
using JNGame.Sync.Entity.Component;
namespace GASSamples.Scripts.Game.Entity.Nodes.Component.Controller
{
public class JNGASBoxController : JNComponent
{
public JNGASComponent GAS => Entity.GetComponent<JNGASComponent>();
public override void OnSyncStart()
{
base.OnSyncStart();
//设置GAS 角色
// GAS.SetPreset();
}
}
}

View File

@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 2ac7f2bb23fb47efb3a21d1160e962ac
timeCreated: 1729282871

View File

@@ -1,3 +1,7 @@
using System;
using GASSamples.Scripts.Game.Entity.Nodes.Component.Components;
using GASSamples.Scripts.Game.Entity.Nodes.Component.Controller;
using JNGame.Runtime.Util.Types;
using JNGame.Sync.Entity.Component;
namespace GASSamples.Scripts.Game.Entity.Nodes.Component.Lookup
@@ -5,5 +9,22 @@ namespace GASSamples.Scripts.Game.Entity.Nodes.Component.Lookup
public class JNGASBoxLookup : JNEntityLookup
{
public int Controller { get; set; }
public int GAS { get; set; }
protected override void BindIndex()
{
base.BindIndex();
Controller = Next();
GAS = Next();
}
protected override void BindType(KeyValue<int, Type> types)
{
base.BindType(types);
types.Add(Controller,typeof(JNGASBoxController));
types.Add(GAS,typeof(JNGASComponent));
}
}
}

View File

@@ -1,3 +1,4 @@
using GASSamples.Scripts.Game.Entity.Nodes.Component.Controller;
using GASSamples.Scripts.Game.Entity.Nodes.Component.Lookup;
using JNGame.Sync.Entity;
using JNGame.Sync.Entity.Component;
@@ -6,9 +7,13 @@ namespace GASSamples.Scripts.Game.Entity.Nodes
{
public class JNGASBox : JNEntity
{
public JNGASBoxController Controller => CLookup.Query<JNGASBoxController>(this);
public override JNEntityLookup NewCLookup()
{
return new JNGASBoxLookup();
}
}
}

View File

@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 09af0fe6bc634405a389bf3e8640507c
timeCreated: 1729283193

View File

@@ -0,0 +1,11 @@
using GAS.Runtime;
namespace GASSamples.Scripts.Game.GAS
{
public class GAbilitySystemComponent : AbilitySystemComponent
{
}
}

View File

@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: f91a65c731e64bceb375e9f6eb571dd1
timeCreated: 1729283247

View File

@@ -4,6 +4,7 @@ using GASSamples.Scripts.Game.Entity;
using GASSamples.Scripts.Game.Logic.Data;
using GASSamples.Scripts.Game.Logic.System;
using GASSamples.Scripts.Game.View;
using JNGame.Runtime.Sync.System.Logic;
using JNGame.Sync.Entity;
using JNGame.Sync.Frame;
using JNGame.Sync.System;
@@ -20,6 +21,7 @@ namespace DefaultNamespace
{
//基础数据
new DInputSystem(), //游戏输入
new JNGASSystem(), //GAS 系统
new DWorldSystem(), //世界逻辑
};
}