(client) feat:实现热重载,实现多维度,实现武器,实现掉落物,实现状态UI,实现攻击AI (#44)

Co-authored-by: zzdxxz <2079238449@qq.com>
Co-committed-by: zzdxxz <2079238449@qq.com>
This commit is contained in:
2025-08-27 19:56:49 +08:00
committed by TheRedApricot
parent d91210a6ff
commit 8456b6c162
132 changed files with 18568 additions and 2534 deletions

View File

@ -1,5 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<Define>
<!-- 贴图部分 -->
<ImageDef>
<defName>testPawnAnimation</defName>
<path>res:Character/Test/Body/idle_down</path>
<wCount>5</wCount>
<hCount>1</hCount>
</ImageDef>
<ImageDef>
<defName>testPawn</defName>
<path>Resources\Character\test.png</path>
<wCount>4</wCount>
<hCount>4</hCount>
</ImageDef>
<!-- 人物定义 -->
<CharacterDef>
<defName>testPawn</defName>
<label>测试小人</label>
@ -10,12 +25,99 @@
</attributes>
<affiliation>player</affiliation>
<drawingOrder>
<texturePath>res:Character\Test</texturePath>
<drawingOrder_down>
<node name="Body" type="Animation" FPS="0.5"/>
</drawingOrder_down>
<!-- Idle states -->
<idle_up>
<textures>
<li>testPawn_0</li>
</textures>
</idle_up>
<idle_down>
<textures>
<li>testPawn_4</li>
</textures>
</idle_down>
<idle_left>
<textures>
<li>testPawn_8</li>
</textures>
</idle_left>
<idle_right>
<textures>
<li>testPawn_12</li>
</textures>
</idle_right>
<!-- Walk states -->
<walk_up>
<textures>
<li>testPawn_1</li>
</textures>
</walk_up>
<walk_down>
<textures>
<li>testPawn_5</li>
</textures>
</walk_down>
<walk_left>
<textures>
<li>testPawn_9</li>
</textures>
</walk_left>
<walk_right>
<textures>
<li>testPawn_13</li>
</textures>
</walk_right>
<!-- Melee Attack states -->
<meleeAttack_up>
<textures>
<li>testPawn_2</li>
</textures>
</meleeAttack_up>
<meleeAttack_down>
<textures>
<li>testPawn_6</li>
</textures>
</meleeAttack_down>
<meleeAttack_left>
<textures>
<li>testPawn_10</li>
</textures>
</meleeAttack_left>
<meleeAttack_right>
<textures>
<li>testPawn_14</li>
</textures>
</meleeAttack_right>
<!-- Ranged Attack states -->
<rangedAttack_up>
<textures>
<li>testPawn_3</li>
</textures>
</rangedAttack_up>
<rangedAttack_down>
<textures>
<li>testPawn_7</li>
</textures>
</rangedAttack_down>
<rangedAttack_left>
<textures>
<li>testPawn_11</li>
</textures>
</rangedAttack_left>
<rangedAttack_right>
<textures>
<li>testPawn_15</li>
</textures>
</rangedAttack_right>
</drawingOrder>
<behaviorTree>
<Node className="ThinkNode_Conditional" value="EntityHealth(50)">
<Node className="JobGiver_AttackJob"/>
<Node className="JobGiver_RandomWander"/>
</Node>
<Node className="JobGiver_RandomWander"/>
</behaviorTree>
</CharacterDef>
@ -30,12 +132,24 @@
</attributes>
<affiliation>player</affiliation>
<drawingOrder>
<texturePath>res:Character\Test</texturePath>
<drawingOrder_down>
<node name="Body"/>
</drawingOrder_down>
<idle_down name="Body" FPS="4">
<textures>
<li>testPawnAnimation_0</li>
<li>testPawnAnimation_1</li>
<li>testPawnAnimation_2</li>
<li>testPawnAnimation_3</li>
<li>testPawnAnimation_4</li>
<li>testPawnAnimation_3</li>
<li>testPawnAnimation_2</li>
<li>testPawnAnimation_1</li>
</textures>
</idle_down>
</drawingOrder>
<behaviorTree>
<Node className="ThinkNode_Conditional" value="EntityHealth(50)">
<Node className="JobGiver_AttackJob"/>
<Node className="JobGiver_RandomWander"/>
</Node>
<Node className="JobGiver_RandomWander"/>
</behaviorTree>
</CharacterDef>
@ -50,14 +164,25 @@
</attributes>
<affiliation>player</affiliation>
<drawingOrder>
<texturePath>res:Character\HighSpeed</texturePath>
<pixelsPerUnit>200</pixelsPerUnit>
<drawingOrder_down>
<node name="Body"/>
</drawingOrder_down>
<idle_down name="Body" FPS="4">
<textures>
<li>testPawnAnimation_0</li>
<li>testPawnAnimation_1</li>
<li>testPawnAnimation_2</li>
<li>testPawnAnimation_3</li>
<li>testPawnAnimation_4</li>
<li>testPawnAnimation_3</li>
<li>testPawnAnimation_2</li>
<li>testPawnAnimation_1</li>
</textures>
</idle_down>
</drawingOrder>
<behaviorTree>
<Node className="JobGiver_Idel"/>
<Node className="ThinkNode_Conditional" value="EntityHealth(50)">
<Node className="JobGiver_AttackJob"/>
<Node className="JobGiver_RandomWander"/>
</Node>
<Node className="JobGiver_RandomWander"/>
</behaviorTree>
</CharacterDef>
@ -71,14 +196,25 @@
</attributes>
<affiliation>player</affiliation>
<drawingOrder>
<texturePath>res:Character\HighSpeed</texturePath>
<pixelsPerUnit>200</pixelsPerUnit>
<drawingOrder_down>
<node name="Body" />
</drawingOrder_down>
<idle_down name="Body" FPS="4">
<textures>
<li>testPawnAnimation_0</li>
<li>testPawnAnimation_1</li>
<li>testPawnAnimation_2</li>
<li>testPawnAnimation_3</li>
<li>testPawnAnimation_4</li>
<li>testPawnAnimation_3</li>
<li>testPawnAnimation_2</li>
<li>testPawnAnimation_1</li>
</textures>
</idle_down>
</drawingOrder>
<behaviorTree>
<Node className="JobGiver_Idel"/>
<Node className="ThinkNode_Conditional" value="EntityHealth(50)">
<Node className="JobGiver_AttackJob"/>
<Node className="JobGiver_RandomWander"/>
</Node>
<Node className="JobGiver_RandomWander"/>
</behaviorTree>
</CharacterDef>

View File

@ -3,10 +3,66 @@
<MonsterDef>
<defName>chicken</defName>
<label>测试鸡</label>
<aiController>embrace</aiController>
<!-- <weapon>Claw</weapon> -->
<label>不大聪明</label>
<behaviorTree>
<Node className="ThinkNode_Conditional" value="EntityHealth(50)">
<Node className="JobGiver_AttackJob"/>
<Node className="JobGiver_RandomWander"/>
</Node>
<Node className="JobGiver_RandomWander"/>
</behaviorTree>
<affiliation>monster</affiliation>
<attributes>
<moveSpeed>1</moveSpeed>
<health>123</health>
</attributes>
<weapon>Claw</weapon>
<drawingOrder>
<idle_down name="Body" FPS="10">
<textures>
<li>testPawnAnimation_0</li>
<li>testPawnAnimation_1</li>
<li>testPawnAnimation_2</li>
<li>testPawnAnimation_3</li>
<li>testPawnAnimation_4</li>
<li>testPawnAnimation_3</li>
<li>testPawnAnimation_2</li>
<li>testPawnAnimation_1</li>
</textures>
</idle_down>
</drawingOrder>
</MonsterDef>
<MonsterDef>
<defName>big</defName>
<label>大聪明</label>
<behaviorTree>
<Node className="ThinkNode_Conditional" value="EntityHealth(50)">
<Node className="JobGiver_AttackJob"/>
<Node className="JobGiver_RandomWander"/>
</Node>
<Node className="JobGiver_RandomWander"/>
</behaviorTree>
<affiliation>monster</affiliation>
<attributes>
<moveSpeed>1</moveSpeed>
<health>123</health>
</attributes>
<weapon>TestGun</weapon>
<drawingOrder>
<idle_down name="Body" FPS="20">
<textures>
<li>testPawnAnimation_0</li>
<li>testPawnAnimation_1</li>
<li>testPawnAnimation_2</li>
<li>testPawnAnimation_3</li>
<li>testPawnAnimation_4</li>
<li>testPawnAnimation_3</li>
<li>testPawnAnimation_2</li>
<li>testPawnAnimation_1</li>
</textures>
</idle_down>
</drawingOrder>
</MonsterDef>
</Define>