(client)feat:实现按武器释放技能

This commit is contained in:
m0_75251201
2025-08-27 19:08:27 +08:00
parent 63efa89ac1
commit 5315e29147
25 changed files with 1184 additions and 5106 deletions

View File

@ -29,8 +29,10 @@
<label>测试枪</label>
<description>一把测试用的枪</description>
<attributes>TestGun</attributes>
<texture>TestGun</texture>
<itemTexture>TestGunItem</itemTexture>
<type>Ranged</type>
<textures>
<li>TestGunItem</li>
</textures>
<bullet>yellowBullet</bullet>
</WeaponDef>
@ -52,12 +54,27 @@
</textures>
</walk_down>
</drawingOrder>
<behaviorTree>
<Node className="JobGiver_ContinuousMove"/>
</behaviorTree>
</BulletDef>
<BulletDef>
<defName>testGunBullet</defName>
<attributes>
<health>1</health>
<moveSpeed>20</moveSpeed>
</attributes>
<drawingOrder>
<idle_down>
<textures>
<li>TestGun</li>
</textures>
</idle_down>
<walk_down>
<textures>
<li>TestGun</li>
</textures>
</walk_down>
</drawingOrder>
</BulletDef>
@ -73,6 +90,7 @@
<WeaponDef>
<defName>Claw</defName>
<label>爪子</label>
<type>Melee</type>
<description>爪子</description>
<attributes>Claw</attributes>
</WeaponDef>

View File

@ -114,6 +114,10 @@
</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>
@ -142,6 +146,10 @@
</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>
@ -170,7 +178,11 @@
</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>
@ -198,7 +210,11 @@
</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,11 +3,20 @@
<MonsterDef>
<defName>chicken</defName>
<label>测试鸡</label>
<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>
@ -24,5 +33,36 @@
</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>