mirror of
http://47.107.252.169:3000/Roguelite-Game-Developing-Team/Gen_Hack-and-Slash-Roguelite.git
synced 2025-11-20 03:17:12 +08:00
(client) feat:支持定义实体的碰撞体大小和偏移;建筑支持定义实体建筑和瓦片建筑,建筑支持指定按钮回调;添加存档管理器;Dev支持设置是否暂停;实体允许定义事件组;添加基地界面 (#57)
Co-authored-by: m0_75251201 <m0_75251201@noreply.gitcode.com> Reviewed-on: http://47.107.252.169:3000/Roguelite-Game-Developing-Team/Gen_Hack-and-Slash-Roguelite/pulls/57
This commit is contained in:
24
Client/Data/Core/Define/Entity/AffiliationDef.xml
Normal file
24
Client/Data/Core/Define/Entity/AffiliationDef.xml
Normal file
@@ -0,0 +1,24 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Define>
|
||||
<AffiliationDef>
|
||||
<defName>none</defName>
|
||||
<label>中立阵营</label>
|
||||
<defaultRelation>Neutral</defaultRelation>
|
||||
</AffiliationDef>
|
||||
<AffiliationDef>
|
||||
<defName>player</defName>
|
||||
<label>玩家阵营</label>
|
||||
<defaultRelation>Neutral</defaultRelation>
|
||||
<hostileFactions>
|
||||
<li>monster</li>
|
||||
</hostileFactions>
|
||||
</AffiliationDef>
|
||||
<AffiliationDef>
|
||||
<defName>monster</defName>
|
||||
<label>怪物阵营</label>
|
||||
<defaultRelation>Hostile</defaultRelation>
|
||||
<hostileFactions>
|
||||
<li>player</li>
|
||||
</hostileFactions>
|
||||
</AffiliationDef>
|
||||
</Define>
|
||||
294
Client/Data/Core/Define/Entity/Character/Character.xml
Normal file
294
Client/Data/Core/Define/Entity/Character/Character.xml
Normal file
@@ -0,0 +1,294 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Define>
|
||||
<!-- 女仆行走贴图 -->
|
||||
<ImageDef>
|
||||
<defName>Character_Maid_Walk</defName>
|
||||
<path>Resources\Character\女仆行走.png</path>
|
||||
<wCount>12</wCount>
|
||||
<hCount>8</hCount>
|
||||
<pixelsPerUnit>32</pixelsPerUnit>
|
||||
</ImageDef>
|
||||
<!-- 玩家角色的详细定义 -->
|
||||
<CharacterDef>
|
||||
<defName>maid</defName>
|
||||
<label>女仆</label>
|
||||
<description>一个可爱的女仆角色</description>
|
||||
|
||||
<!-- 角色基础属性 -->
|
||||
<attributes>
|
||||
<health>100</health>
|
||||
<moveSpeed>2</moveSpeed>
|
||||
<!-- 更多 attributesDef 中的属性... -->
|
||||
</attributes>
|
||||
|
||||
<!-- 角色所属阵营 -->
|
||||
<affiliation>player</affiliation> <!-- 引用 AffiliationDef 的 defName -->
|
||||
|
||||
<!-- 角色不同状态和朝向的绘制指令 -->
|
||||
<drawingOrder>
|
||||
<!-- Idle states -->
|
||||
<idle_up>
|
||||
<textures>
|
||||
<li>Character_Maid_Walk_37</li>
|
||||
</textures>
|
||||
</idle_up>
|
||||
<idle_down>
|
||||
<textures>
|
||||
<li>Character_Maid_Walk_1</li>
|
||||
</textures>
|
||||
</idle_down>
|
||||
<idle_left>
|
||||
<textures>
|
||||
<li>Character_Maid_Walk_13</li>
|
||||
</textures>
|
||||
</idle_left>
|
||||
<idle_right>
|
||||
<textures>
|
||||
<li>Character_Maid_Walk_25</li>
|
||||
</textures>
|
||||
</idle_right>
|
||||
|
||||
<!-- Walk states -->
|
||||
<walk_up>
|
||||
<FPS>5.0</FPS>
|
||||
<textures>
|
||||
<li>Character_Maid_Walk_36</li>
|
||||
<li>Character_Maid_Walk_37</li>
|
||||
<li>Character_Maid_Walk_38</li>
|
||||
<li>Character_Maid_Walk_37</li>
|
||||
</textures>
|
||||
</walk_up>
|
||||
<walk_down>
|
||||
<FPS>5.0</FPS>
|
||||
<textures>
|
||||
<li>Character_Maid_Walk_0</li>
|
||||
<li>Character_Maid_Walk_1</li>
|
||||
<li>Character_Maid_Walk_2</li>
|
||||
<li>Character_Maid_Walk_1</li>
|
||||
</textures>
|
||||
</walk_down>
|
||||
<walk_left>
|
||||
<FPS>5.0</FPS>
|
||||
<textures>
|
||||
<li>Character_Maid_Walk_12</li>
|
||||
<li>Character_Maid_Walk_13</li>
|
||||
<li>Character_Maid_Walk_14</li>
|
||||
<li>Character_Maid_Walk_13</li>
|
||||
</textures>
|
||||
</walk_left>
|
||||
<walk_right>
|
||||
<FPS>5.0</FPS>
|
||||
<textures>
|
||||
<li>Character_Maid_Walk_24</li>
|
||||
<li>Character_Maid_Walk_25</li>
|
||||
<li>Character_Maid_Walk_26</li>
|
||||
<li>Character_Maid_Walk_25</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_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>
|
||||
</behaviorTree>
|
||||
|
||||
|
||||
</CharacterDef>
|
||||
|
||||
<ImageDef>
|
||||
<defName>PlayerIdle</defName>
|
||||
<path>Resources\Character\PlayerIdle.png</path>
|
||||
<wCount>2</wCount>
|
||||
<hCount>4</hCount>
|
||||
<pixelsPerUnit>32</pixelsPerUnit>
|
||||
</ImageDef>
|
||||
<ImageDef>
|
||||
<defName>PlayerWalk</defName>
|
||||
<path>Resources\Character\PlayerWalk.png</path>
|
||||
<wCount>4</wCount>
|
||||
<hCount>4</hCount>
|
||||
<pixelsPerUnit>32</pixelsPerUnit>
|
||||
</ImageDef>
|
||||
|
||||
<CharacterDef>
|
||||
<defName>testPawn</defName>
|
||||
<label>测试小人</label>
|
||||
<description>用于测试功能的角色</description>
|
||||
<attributes>
|
||||
<health>100</health>
|
||||
<moveSpeed>2</moveSpeed>
|
||||
</attributes>
|
||||
<affiliation>player</affiliation>
|
||||
<drawingOrder>
|
||||
<!-- Idle states -->
|
||||
<idle_up>
|
||||
<FPS>2.0</FPS>
|
||||
<textures>
|
||||
<li>PlayerIdle_2</li>
|
||||
<li>PlayerIdle_3</li>
|
||||
</textures>
|
||||
</idle_up>
|
||||
<idle_down>
|
||||
<FPS>2.0</FPS>
|
||||
<textures>
|
||||
<li>PlayerIdle_0</li>
|
||||
<li>PlayerIdle_1</li>
|
||||
</textures>
|
||||
</idle_down>
|
||||
<idle_left>
|
||||
<FPS>2.0</FPS>
|
||||
<textures>
|
||||
<li>PlayerIdle_6</li>
|
||||
<li>PlayerIdle_7</li>
|
||||
</textures>
|
||||
</idle_left>
|
||||
<idle_right>
|
||||
<FPS>2.0</FPS>
|
||||
<textures>
|
||||
<li>PlayerIdle_4</li>
|
||||
<li>PlayerIdle_5</li>
|
||||
</textures>
|
||||
</idle_right>
|
||||
|
||||
<!-- Walk states -->
|
||||
<walk_down>
|
||||
<FPS>4.0</FPS>
|
||||
<textures>
|
||||
<li>PlayerWalk_0</li>
|
||||
<li>PlayerWalk_1</li>
|
||||
<li>PlayerWalk_2</li>
|
||||
<li>PlayerWalk_3</li>
|
||||
</textures>
|
||||
</walk_down>
|
||||
<walk_up>
|
||||
<FPS>4.0</FPS>
|
||||
<textures>
|
||||
<li>PlayerWalk_4</li>
|
||||
<li>PlayerWalk_5</li>
|
||||
<li>PlayerWalk_6</li>
|
||||
<li>PlayerWalk_7</li>
|
||||
</textures>
|
||||
</walk_up>
|
||||
<walk_right>
|
||||
<FPS>4.0</FPS>
|
||||
<textures>
|
||||
<li>PlayerWalk_8</li>
|
||||
<li>PlayerWalk_9</li>
|
||||
<li>PlayerWalk_10</li>
|
||||
<li>PlayerWalk_11</li>
|
||||
</textures>
|
||||
</walk_right>
|
||||
<walk_left>
|
||||
<FPS>4.0</FPS>
|
||||
<textures>
|
||||
<li>PlayerWalk_12</li>
|
||||
<li>PlayerWalk_13</li>
|
||||
<li>PlayerWalk_14</li>
|
||||
<li>PlayerWalk_15</li>
|
||||
</textures>
|
||||
</walk_left>
|
||||
|
||||
<!-- 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>
|
||||
</Define>
|
||||
70
Client/Data/Core/Define/Entity/Monster.xml
Normal file
70
Client/Data/Core/Define/Entity/Monster.xml
Normal file
@@ -0,0 +1,70 @@
|
||||
<?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>BasicMonsterBehavior</behaviorTree>
|
||||
<affiliation>monster</affiliation>
|
||||
<attributes>
|
||||
<moveSpeed>1</moveSpeed>
|
||||
<health>2</health> <!-- 123 -> approx 2 (round down) -->
|
||||
</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>BasicMonsterBehavior</behaviorTree>
|
||||
<affiliation>monster</affiliation>
|
||||
<attributes>
|
||||
<moveSpeed>1</moveSpeed>
|
||||
<health>2</health> <!-- 123 -> approx 2 (round down) -->
|
||||
</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>
|
||||
<!-- Mechanical Monsters -->
|
||||
|
||||
|
||||
</Define>
|
||||
152
Client/Data/Core/Define/Entity/MonsterTextures.xml
Normal file
152
Client/Data/Core/Define/Entity/MonsterTextures.xml
Normal file
@@ -0,0 +1,152 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Define>
|
||||
<!-- ImageDefs for Mechanical Monsters -->
|
||||
<ImageDef>
|
||||
<defName>MechanicalMonsterA1Texture</defName>
|
||||
<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 -->
|
||||
<ImageDef>
|
||||
<defName>HybridMonsterD1Texture</defName>
|
||||
<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 -->
|
||||
<ImageDef>
|
||||
<defName>BiologicalMaskMonster1Texture</defName>
|
||||
<path>res:Texture/Monster/生物/面具1</path>
|
||||
<wCount>1</wCount>
|
||||
<hCount>1</hCount>
|
||||
<pixelsPerUnit>1500</pixelsPerUnit>
|
||||
</ImageDef>
|
||||
<!-- <ImageDef>
|
||||
<defName>BiologicalMaskMonster4Texture</defName>
|
||||
<path>res:Texture/Monster/生物/面具4</path>
|
||||
<wCount>1</wCount>
|
||||
<hCount>1</hCount>
|
||||
</ImageDef> -->
|
||||
<ImageDef>
|
||||
<defName>BiologicalHologramMonster1Texture</defName>
|
||||
<path>res:Texture/Monster/生物/全息1</path>
|
||||
<wCount>1</wCount>
|
||||
<hCount>1</hCount>
|
||||
<pixelsPerUnit>1500</pixelsPerUnit>
|
||||
</ImageDef>
|
||||
<!-- <ImageDef>
|
||||
<defName>BiologicalHologramMonster3Texture</defName>
|
||||
<path>res:Texture/Monster/生物/全息3</path>
|
||||
<wCount>1</wCount>
|
||||
<hCount>1</hCount>
|
||||
</ImageDef> -->
|
||||
<ImageDef>
|
||||
<defName>BiologicalSnakeMonster1Texture</defName>
|
||||
<path>res:Texture/Monster/生物/蛇1</path>
|
||||
<wCount>1</wCount>
|
||||
<hCount>1</hCount>
|
||||
<pixelsPerUnit>1500</pixelsPerUnit>
|
||||
</ImageDef>
|
||||
<!-- <ImageDef>
|
||||
<defName>BiologicalSnakeMonster4Texture</defName>
|
||||
<path>res:Texture/Monster/生物/蛇4</path>
|
||||
<wCount>1</wCount>
|
||||
<hCount>1</hCount>
|
||||
</ImageDef> -->
|
||||
<!-- <ImageDef>
|
||||
<defName>BiologicalRatMonster1Texture</defName>
|
||||
<path>res:Texture/Monster/生物/鼠鼠1</path>
|
||||
<wCount>1</wCount>
|
||||
<hCount>1</hCount>
|
||||
</ImageDef>
|
||||
<ImageDef>
|
||||
<defName>BiologicalRatMonster2Texture</defName>
|
||||
<path>res:Texture/Monster/生物/鼠鼠2</path>
|
||||
<wCount>1</wCount>
|
||||
<hCount>1</hCount>
|
||||
</ImageDef> -->
|
||||
<!-- Generic Bullet Texture (if not specific per monster) -->
|
||||
<ImageDef>
|
||||
<defName>GenericBulletTexture</defName>
|
||||
<path>res:Texture/Bullet/GenericBullet</path>
|
||||
<wCount>1</wCount>
|
||||
<hCount>1</hCount>
|
||||
<pixelsPerUnit>1500</pixelsPerUnit>
|
||||
</ImageDef>
|
||||
|
||||
</Define>
|
||||
Reference in New Issue
Block a user