(client) feat:添加临时动画组件,添加逃跑逻辑

This commit is contained in:
m0_75251201
2025-09-06 12:25:55 +08:00
parent f43aeffebf
commit 15cdd2b244
73 changed files with 3420 additions and 6055 deletions

View File

@ -28,20 +28,26 @@
<defName>TestGun</defName>
<label>测试枪</label>
<description>一把测试用的枪</description>
<!-- 引用属性定义 -->
<attributes>TestGun</attributes>
<type>Ranged</type>
<textures>
<li>TestGunItem</li>
</textures>
<!-- 引用子弹定义 -->
<bullet>yellowBullet</bullet>
</WeaponDef>
<BulletDef>
<defName>yellowBullet</defName>
<label>黄色子弹</label>
<description>一颗黄色的子弹</description>
<!-- 嵌套定义属性 -->
<attributes>
<health>1</health>
<moveSpeed>20</moveSpeed>
</attributes>
<!-- 嵌套定义纹理绘制顺序 -->
<drawingOrder>
<idle_down>
<textures>
@ -108,6 +114,11 @@
<li>GenericBulletTexture</li>
</textures>
</idle_down>
<walk_down>
<textures>
<li>GenericBulletTexture</li>
</textures>
</walk_down>
</drawingOrder>
</BulletDef>
<BulletDef>
@ -122,6 +133,11 @@
<li>GenericBulletTexture</li>
</textures>
</idle_down>
<walk_down>
<textures>
<li>GenericBulletTexture</li>
</textures>
</walk_down>
</drawingOrder>
</BulletDef>
<BulletDef>
@ -136,6 +152,11 @@
<li>GenericBulletTexture</li>
</textures>
</idle_down>
<walk_down>
<textures>
<li>GenericBulletTexture</li>
</textures>
</walk_down>
</drawingOrder>
</BulletDef>
<BulletDef>
@ -150,6 +171,11 @@
<li>GenericBulletTexture</li>
</textures>
</idle_down>
<walk_down>
<textures>
<li>GenericBulletTexture</li>
</textures>
</walk_down>
</drawingOrder>
</BulletDef>
<BulletDef>
@ -164,8 +190,14 @@
<li>GenericBulletTexture</li>
</textures>
</idle_down>
<walk_down>
<textures>
<li>GenericBulletTexture</li>
</textures>
</walk_down>
</drawingOrder>
</BulletDef>
<!-- Weapon Definitions for all monsters -->
<!-- Mechanical Monsters -->
<WeaponDef>

View File

@ -1,16 +1,22 @@
<?xml version="1.0" encoding="utf-8"?>
<Define>
<BehaviorTreeDef>
<defName>BasicMonsterBehavior</defName>
<Node className="ThinkNode_Selector">
<Node className="ThinkNode_Conditional" value="HasEnemyInSight()">
<Node className="ThinkNode_Conditional" value="HasWeapon()">
<Node className="JobGiver_AttackJob"/>
</Node>
<Node className="JobGiver_FleeJob"/>
</Node>
<Node className="JobGiver_RandomWander"/>
</Node>
</BehaviorTreeDef>
<MonsterDef>
<defName>chicken</defName>
<label>不大聪明</label>
<behaviorTree>
<Node className="ThinkNode_Conditional" value="HasEnemyInSight()">
<Node className="JobGiver_AttackJob"/>
<Node className="JobGiver_RandomWander"/>
</Node>
<Node className="JobGiver_RandomWander"/>
</behaviorTree>
<behaviorTree>BasicMonsterBehavior</behaviorTree>
<affiliation>monster</affiliation>
<attributes>
<moveSpeed>1</moveSpeed>
@ -36,13 +42,7 @@
<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>
<behaviorTree>BasicMonsterBehavior</behaviorTree>
<affiliation>monster</affiliation>
<attributes>
<moveSpeed>1</moveSpeed>
@ -69,12 +69,7 @@
<defName>MonsterA1</defName>
<label>A怪物1 (普通)</label>
<description>机械类型怪物拥有远程攻击能力。击杀后掉落5能量。</description>
<behaviorTree>
<Node className="ThinkNode_Conditional" value="HasEnemyInSight()">
<Node className="JobGiver_AttackJob"/>
</Node>
<Node className="JobGiver_RandomWander"/>
</behaviorTree>
<behaviorTree>BasicMonsterBehavior</behaviorTree>
<affiliation>monster</affiliation>
<attributes>
<health>4600</health>
@ -104,18 +99,12 @@
</textures>
</rangedAttack_down>
</drawingOrder>
<tag_dropEnergyOnDefeat>5</tag_dropEnergyOnDefeat>
</MonsterDef>
<MonsterDef>
<defName>MonsterA2</defName>
<label>A怪物2 (普通)</label>
<description>更快的机械远程怪物。击杀后掉落5能量。</description>
<behaviorTree>
<Node className="ThinkNode_Conditional" value="HasEnemyInSight()">
<Node className="JobGiver_AttackJob"/>
</Node>
<Node className="JobGiver_RandomWander"/>
</behaviorTree>
<behaviorTree>BasicMonsterBehavior</behaviorTree>
<affiliation>monster</affiliation>
<attributes>
<health>6000</health>
@ -145,18 +134,12 @@
</textures>
</rangedAttack_down>
</drawingOrder>
<tag_dropEnergyOnDefeat>5</tag_dropEnergyOnDefeat>
</MonsterDef>
<MonsterDef>
<defName>MonsterB1</defName>
<label>B怪物1 (普通)</label>
<description>防御较高的机械近战怪物。击杀后掉落5能量。</description>
<behaviorTree>
<Node className="ThinkNode_Conditional" value="HasEnemyInSight()">
<Node className="JobGiver_AttackJob"/>
</Node>
<Node className="JobGiver_RandomWander"/>
</behaviorTree>
<behaviorTree>BasicMonsterBehavior</behaviorTree>
<affiliation>monster</affiliation>
<attributes>
<health>5000</health>
@ -186,18 +169,12 @@
</textures>
</rangedAttack_down>
</drawingOrder>
<tag_dropEnergyOnDefeat>5</tag_dropEnergyOnDefeat>
</MonsterDef>
<MonsterDef>
<defName>MonsterB2</defName>
<label>B怪物2 (普通)</label>
<description>高血高防的机械近战怪物。击杀后掉落5能量。</description>
<behaviorTree>
<Node className="ThinkNode_Conditional" value="HasEnemyInSight()">
<Node className="JobGiver_AttackJob"/>
</Node>
<Node className="JobGiver_RandomWander"/>
</behaviorTree>
<behaviorTree>BasicMonsterBehavior</behaviorTree>
<affiliation>monster</affiliation>
<attributes>
<health>8000</health>
@ -227,18 +204,12 @@
</textures>
</rangedAttack_down>
</drawingOrder>
<tag_dropEnergyOnDefeat>5</tag_dropEnergyOnDefeat>
</MonsterDef>
<MonsterDef>
<defName>MonsterC1</defName>
<label>C怪物1 (精英)</label>
<description>血量和防御极高的精英机械近战怪物。击杀后掉落10能量。</description>
<behaviorTree>
<Node className="ThinkNode_Conditional" value="HasEnemyInSight()">
<Node className="JobGiver_AttackJob"/>
</Node>
<Node className="JobGiver_RandomWander"/>
</behaviorTree>
<behaviorTree>BasicMonsterBehavior</behaviorTree>
<affiliation>monster</affiliation>
<attributes>
<health>22000</health>
@ -268,18 +239,12 @@
</textures>
</rangedAttack_down>
</drawingOrder>
<tag_dropEnergyOnDefeat>10</tag_dropEnergyOnDefeat>
</MonsterDef>
<MonsterDef>
<defName>MonsterC2</defName>
<label>C怪物2 (精英)</label>
<description>血量极高的精英机械近战怪物攻击力强大。击杀后掉落10能量。</description>
<behaviorTree>
<Node className="ThinkNode_Conditional" value="HasEnemyInSight()">
<Node className="JobGiver_AttackJob"/>
</Node>
<Node className="JobGiver_RandomWander"/>
</behaviorTree>
<behaviorTree>BasicMonsterBehavior</behaviorTree>
<affiliation>monster</affiliation>
<attributes>
<health>22000</health>
@ -309,19 +274,13 @@
</textures>
</rangedAttack_down>
</drawingOrder>
<tag_dropEnergyOnDefeat>10</tag_dropEnergyOnDefeat>
</MonsterDef>
<!-- Hybrid Monsters -->
<MonsterDef>
<defName>MonsterD1</defName>
<label>D怪物1 (普通)</label>
<description>混合类型怪物拥有远程攻击能力。击杀后掉落5能量。</description>
<behaviorTree>
<Node className="ThinkNode_Conditional" value="HasEnemyInSight()">
<Node className="JobGiver_AttackJob"/>
</Node>
<Node className="JobGiver_RandomWander"/>
</behaviorTree>
<behaviorTree>BasicMonsterBehavior</behaviorTree>
<affiliation>monster</affiliation>
<attributes>
<health>6400</health>
@ -351,18 +310,12 @@
</textures>
</rangedAttack_down>
</drawingOrder>
<tag_dropEnergyOnDefeat>5</tag_dropEnergyOnDefeat>
</MonsterDef>
<MonsterDef>
<defName>MonsterD2</defName>
<label>D怪物2 (普通)</label>
<description>混合类型怪物高速远程攻击。击杀后掉落5能量。</description>
<behaviorTree>
<Node className="ThinkNode_Conditional" value="HasEnemyInSight()">
<Node className="JobGiver_AttackJob"/>
</Node>
<Node className="JobGiver_RandomWander"/>
</behaviorTree>
<behaviorTree>BasicMonsterBehavior</behaviorTree>
<affiliation>monster</affiliation>
<attributes>
<health>7200</health>
@ -392,18 +345,12 @@
</textures>
</rangedAttack_down>
</drawingOrder>
<tag_dropEnergyOnDefeat>5</tag_dropEnergyOnDefeat>
</MonsterDef>
<MonsterDef>
<defName>MonsterE1</defName>
<label>E怪物1 (普通)</label>
<description>混合类型近战怪物高速。击杀后掉落5能量。</description>
<behaviorTree>
<Node className="ThinkNode_Conditional" value="HasEnemyInSight()">
<Node className="JobGiver_AttackJob"/>
</Node>
<Node className="JobGiver_RandomWander"/>
</behaviorTree>
<behaviorTree>BasicMonsterBehavior</behaviorTree>
<affiliation>monster</affiliation>
<attributes>
<health>6550</health>
@ -433,18 +380,12 @@
</textures>
</rangedAttack_down>
</drawingOrder>
<tag_dropEnergyOnDefeat>5</tag_dropEnergyOnDefeat>
</MonsterDef>
<MonsterDef>
<defName>MonsterE2</defName>
<label>E怪物2 (普通)</label>
<description>更强大的混合类型近战怪物。击杀后掉落5能量。</description>
<behaviorTree>
<Node className="ThinkNode_Conditional" value="HasEnemyInSight()">
<Node className="JobGiver_AttackJob"/>
</Node>
<Node className="JobGiver_RandomWander"/>
</behaviorTree>
<behaviorTree>BasicMonsterBehavior</behaviorTree>
<affiliation>monster</affiliation>
<attributes>
<health>9120</health>
@ -474,18 +415,12 @@
</textures>
</rangedAttack_down>
</drawingOrder>
<tag_dropEnergyOnDefeat>5</tag_dropEnergyOnDefeat>
</MonsterDef>
<MonsterDef>
<defName>MonsterF1</defName>
<label>F怪物1 (关卡11BOSS)</label>
<description>关卡BOSS血量和防御极高近战爆发强。击杀后掉落50能量。</description>
<behaviorTree>
<Node className="ThinkNode_Conditional" value="HasEnemyInSight()">
<Node className="JobGiver_AttackJob"/>
</Node>
<Node className="JobGiver_RandomWander"/>
</behaviorTree>
<behaviorTree>BasicMonsterBehavior</behaviorTree>
<affiliation>monster</affiliation>
<attributes>
<health>42000</health>
@ -515,18 +450,12 @@
</textures>
</rangedAttack_down>
</drawingOrder>
<tag_dropEnergyOnDefeat>50</tag_dropEnergyOnDefeat>
</MonsterDef>
<MonsterDef>
<defName>MonsterF2</defName>
<label>F怪物2 (关卡11BOSS)</label>
<description>终极关卡BOSS超高血量和攻击力。击杀后掉落50能量。</description>
<behaviorTree>
<Node className="ThinkNode_Conditional" value="HasEnemyInSight()">
<Node className="JobGiver_AttackJob"/>
</Node>
<Node className="JobGiver_RandomWander"/>
</behaviorTree>
<behaviorTree>BasicMonsterBehavior</behaviorTree>
<affiliation>monster</affiliation>
<attributes>
<health>48000</health>
@ -556,19 +485,13 @@
</textures>
</rangedAttack_down>
</drawingOrder>
<tag_dropEnergyOnDefeat>50</tag_dropEnergyOnDefeat>
</MonsterDef>
<!-- Biological Monsters -->
<MonsterDef>
<defName>MaskMonster1</defName>
<label>面具1/2/3 (普通)</label>
<description>快速生物近战怪物。击杀后掉落5能量。</description>
<behaviorTree>
<Node className="ThinkNode_Conditional" value="HasEnemyInSight()">
<Node className="JobGiver_AttackJob"/>
</Node>
<Node className="JobGiver_RandomWander"/>
</behaviorTree>
<behaviorTree>BasicMonsterBehavior</behaviorTree>
<affiliation>monster</affiliation>
<attributes>
<health>4800</health>
@ -598,18 +521,12 @@
</textures>
</rangedAttack_down>
</drawingOrder>
<tag_dropEnergyOnDefeat>5</tag_dropEnergyOnDefeat>
</MonsterDef>
<MonsterDef>
<defName>MaskMonster4</defName>
<label>面具4/5/6 (精英)</label>
<description>更强大的快速精英生物近战怪物。击杀后掉落10能量。</description>
<behaviorTree>
<Node className="ThinkNode_Conditional" value="HasEnemyInSight()">
<Node className="JobGiver_AttackJob"/>
</Node>
<Node className="JobGiver_RandomWander"/>
</behaviorTree>
<behaviorTree>BasicMonsterBehavior</behaviorTree>
<affiliation>monster</affiliation>
<attributes>
<health>9600</health>
@ -639,18 +556,12 @@
</textures>
</rangedAttack_down>
</drawingOrder>
<tag_dropEnergyOnDefeat>10</tag_dropEnergyOnDefeat>
</MonsterDef>
<MonsterDef>
<defName>HologramMonster1</defName>
<label>全息1/2 (普通)</label>
<description>特殊的生物近战怪物无移动速度。击杀后掉落5能量。</description>
<behaviorTree>
<Node className="ThinkNode_Conditional" value="HasEnemyInSight()">
<Node className="JobGiver_AttackJob"/>
</Node>
<Node className="JobGiver_RandomWander"/>
</behaviorTree>
<behaviorTree>BasicMonsterBehavior</behaviorTree>
<affiliation>monster</affiliation>
<attributes>
<health>6666</health>
@ -680,18 +591,12 @@
</textures>
</rangedAttack_down>
</drawingOrder>
<tag_dropEnergyOnDefeat>5</tag_dropEnergyOnDefeat>
</MonsterDef>
<MonsterDef>
<defName>HologramMonster3</defName>
<label>全息3/4 (精英)</label>
<description>更强大的精英生物近战怪物无移动速度。击杀后掉落10能量。</description>
<behaviorTree>
<Node className="ThinkNode_Conditional" value="HasEnemyInSight()">
<Node className="JobGiver_AttackJob"/>
</Node>
<Node className="JobGiver_RandomWander"/>
</behaviorTree>
<behaviorTree>BasicMonsterBehavior</behaviorTree>
<affiliation>monster</affiliation>
<attributes>
<health>16666</health>
@ -721,18 +626,12 @@
</textures>
</rangedAttack_down>
</drawingOrder>
<tag_dropEnergyOnDefeat>10</tag_dropEnergyOnDefeat>
</MonsterDef>
<MonsterDef>
<defName>SnakeMonster1</defName>
<label>蛇1/2/3 (普通)</label>
<description>生物远程怪物。击杀后掉落5能量。</description>
<behaviorTree>
<Node className="ThinkNode_Conditional" value="HasEnemyInSight()">
<Node className="JobGiver_AttackJob"/>
</Node>
<Node className="JobGiver_RandomWander"/>
</behaviorTree>
<behaviorTree>BasicMonsterBehavior</behaviorTree>
<affiliation>monster</affiliation>
<attributes>
<health>5630</health>
@ -762,18 +661,12 @@
</textures>
</rangedAttack_down>
</drawingOrder>
<tag_dropEnergyOnDefeat>5</tag_dropEnergyOnDefeat>
</MonsterDef>
<MonsterDef>
<defName>SnakeMonster4</defName>
<label>蛇4/5/6 (精英)</label>
<description>更强大的精英生物远程怪物。击杀后掉落10能量。</description>
<behaviorTree>
<Node className="ThinkNode_Conditional" value="HasEnemyInSight()">
<Node className="JobGiver_AttackJob"/>
</Node>
<Node className="JobGiver_RandomWander"/>
</behaviorTree>
<behaviorTree>BasicMonsterBehavior</behaviorTree>
<affiliation>monster</affiliation>
<attributes>
<health>11260</health>
@ -803,18 +696,12 @@
</textures>
</rangedAttack_down>
</drawingOrder>
<tag_dropEnergyOnDefeat>10</tag_dropEnergyOnDefeat>
</MonsterDef>
<MonsterDef>
<defName>RatMonster1</defName>
<label>鼠鼠1 (普通)</label>
<description>弱小的生物近战怪物每11秒移动一次。击杀后掉落1能量。</description>
<behaviorTree>
<Node className="ThinkNode_Conditional" value="HasEnemyInSight()">
<Node className="JobGiver_AttackJob"/>
</Node>
<Node className="JobGiver_RandomWander"/>
</behaviorTree>
<behaviorTree>BasicMonsterBehavior</behaviorTree>
<affiliation>monster</affiliation>
<attributes>
<health>111</health>
@ -844,18 +731,12 @@
</textures>
</rangedAttack_down>
</drawingOrder>
<tag_dropEnergyOnDefeat>1</tag_dropEnergyOnDefeat>
</MonsterDef>
<MonsterDef>
<defName>RatMonster2</defName>
<label>鼠鼠2 (精英)</label>
<description>更强大的精英生物近战怪物每22秒移动一次。击杀后掉落2能量。</description>
<behaviorTree>
<Node className="ThinkNode_Conditional" value="HasEnemyInSight()">
<Node className="JobGiver_AttackJob"/>
</Node>
<Node className="JobGiver_RandomWander"/>
</behaviorTree>
<behaviorTree>BasicMonsterBehavior</behaviorTree>
<affiliation>monster</affiliation>
<attributes>
<health>222</health>
@ -885,7 +766,6 @@
</textures>
</rangedAttack_down>
</drawingOrder>
<tag_dropEnergyOnDefeat>2</tag_dropEnergyOnDefeat>
</MonsterDef>
</Define>
</Define>

View File

@ -6,36 +6,42 @@
<path>res:Texture/Monster/机械/A怪物1</path>
<wCount>1</wCount>
<hCount>1</hCount>
<pixelsPerUnit>1500</pixelsPerUnit>
</ImageDef>
<ImageDef>
<defName>MechanicalMonsterA2Texture</defName>
<path>res:Texture/Monster/机械/A怪物2</path>
<wCount>1</wCount>
<hCount>1</hCount>
<pixelsPerUnit>1500</pixelsPerUnit>
</ImageDef>
<ImageDef>
<defName>MechanicalMonsterB1Texture</defName>
<path>res:Texture/Monster/机械/B怪物1</path>
<wCount>1</wCount>
<hCount>1</hCount>
<pixelsPerUnit>1500</pixelsPerUnit>
</ImageDef>
<ImageDef>
<defName>MechanicalMonsterB2Texture</defName>
<path>res:Texture/Monster/机械/B怪物2</path>
<wCount>1</wCount>
<hCount>1</hCount>
<pixelsPerUnit>1500</pixelsPerUnit>
</ImageDef>
<ImageDef>
<defName>MechanicalMonsterC1Texture</defName>
<path>res:Texture/Monster/机械/C怪物1</path>
<wCount>1</wCount>
<hCount>1</hCount>
<pixelsPerUnit>1500</pixelsPerUnit>
</ImageDef>
<ImageDef>
<defName>MechanicalMonsterC2Texture</defName>
<path>res:Texture/Monster/机械/C怪物2</path>
<wCount>1</wCount>
<hCount>1</hCount>
<pixelsPerUnit>1500</pixelsPerUnit>
</ImageDef>
<!-- ImageDefs for Hybrid Monsters -->
@ -44,36 +50,42 @@
<path>res:Texture/Monster/混合/D怪物1</path>
<wCount>1</wCount>
<hCount>1</hCount>
<pixelsPerUnit>1500</pixelsPerUnit>
</ImageDef>
<ImageDef>
<defName>HybridMonsterD2Texture</defName>
<path>res:Texture/Monster/混合/D怪物2</path>
<wCount>1</wCount>
<hCount>1</hCount>
<pixelsPerUnit>1500</pixelsPerUnit>
</ImageDef>
<ImageDef>
<defName>HybridMonsterE1Texture</defName>
<path>res:Texture/Monster/混合/E怪物1</path>
<wCount>1</wCount>
<hCount>1</hCount>
<pixelsPerUnit>1500</pixelsPerUnit>
</ImageDef>
<ImageDef>
<defName>HybridMonsterE2Texture</defName>
<path>res:Texture/Monster/混合/E怪物2</path>
<wCount>1</wCount>
<hCount>1</hCount>
<pixelsPerUnit>1500</pixelsPerUnit>
</ImageDef>
<ImageDef>
<defName>HybridMonsterF1Texture</defName>
<path>res:Texture/Monster/混合/F怪物1</path>
<wCount>1</wCount>
<hCount>1</hCount>
<pixelsPerUnit>1500</pixelsPerUnit>
</ImageDef>
<ImageDef>
<defName>HybridMonsterF2Texture</defName>
<path>res:Texture/Monster/混合/F怪物2</path>
<wCount>1</wCount>
<hCount>1</hCount>
<pixelsPerUnit>1500</pixelsPerUnit>
</ImageDef>
<!-- ImageDefs for Biological Monsters -->
@ -82,6 +94,7 @@
<path>res:Texture/Monster/生物/面具1</path>
<wCount>1</wCount>
<hCount>1</hCount>
<pixelsPerUnit>1500</pixelsPerUnit>
</ImageDef>
<!-- <ImageDef>
<defName>BiologicalMaskMonster4Texture</defName>
@ -94,6 +107,7 @@
<path>res:Texture/Monster/生物/全息1</path>
<wCount>1</wCount>
<hCount>1</hCount>
<pixelsPerUnit>1500</pixelsPerUnit>
</ImageDef>
<!-- <ImageDef>
<defName>BiologicalHologramMonster3Texture</defName>
@ -106,6 +120,7 @@
<path>res:Texture/Monster/生物/蛇1</path>
<wCount>1</wCount>
<hCount>1</hCount>
<pixelsPerUnit>1500</pixelsPerUnit>
</ImageDef>
<!-- <ImageDef>
<defName>BiologicalSnakeMonster4Texture</defName>
@ -131,6 +146,7 @@
<path>res:Texture/Bullet/GenericBullet</path>
<wCount>1</wCount>
<hCount>1</hCount>
<pixelsPerUnit>1500</pixelsPerUnit>
</ImageDef>
</Define>
</Define>