Merge branch 'main' of http://shu.sheziwanglo.cn:3000/shurongsen/Cute_demon_attacks
This commit is contained in:
commit
957565017a
@ -1,86 +0,0 @@
|
||||
[
|
||||
{
|
||||
"temp_id": "M_H_001",
|
||||
"monster_code": "火萌妖-01",
|
||||
"skills": [
|
||||
{
|
||||
"positioning": "长周期烧一条直线上",
|
||||
"name": "火龙之舌",
|
||||
"effects": {
|
||||
"level_1": "射程提升2格位置",
|
||||
"level_2": "伤害提升15%",
|
||||
"level_3": "被火焰伤害的敌人有20%概率原地眩晕1秒,射程减少1格",
|
||||
"level_4": "伤害提升35%",
|
||||
"level_5": "喷火冷却时间减少50%,持续喷火时间减少50%"
|
||||
}
|
||||
},
|
||||
{
|
||||
"positioning": "近身攻击多个敌人",
|
||||
"name": "烈焰之舞",
|
||||
"effects": {
|
||||
"level_1": "喷出的火焰散开为3个,但每个火焰伤害减少50%",
|
||||
"level_2": "伤害提升15%",
|
||||
"level_3": "降低敌人20%移动速度,攻击CD增加5%",
|
||||
"level_4": "伤害提升35%",
|
||||
"level_5": "喷火冷却时间增加30%,持续喷火时间增加50%"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"temp_id": "M_S_001",
|
||||
"monster_code": "水萌妖-01",
|
||||
"skills": [
|
||||
{
|
||||
"positioning": "快速射出子弹,增加对空伤害",
|
||||
"name": "寒冰子弹",
|
||||
"effects": {
|
||||
"level_1": "攻击CD减少25%",
|
||||
"level_2": "伤害提升15%",
|
||||
"level_3": "增加子弹20%飞行速度,射程减少1格",
|
||||
"level_4": "伤害提升35%",
|
||||
"level_5": "对攻击减速的敌人造成额外30%伤害,攻击CD增加5%"
|
||||
}
|
||||
},
|
||||
{
|
||||
"positioning": "增加对空debuff,对小型怪伤害加强",
|
||||
"name": "冰霜风暴",
|
||||
"effects": {
|
||||
"level_1": "攻击CD减少25%",
|
||||
"level_2": "伤害提升15%",
|
||||
"level_3": "对小型敌人增加25%伤害,射程减少1格",
|
||||
"level_4": "伤害提升35%",
|
||||
"level_5": "每次攻击增加20%暴击率,攻击CD增加5%"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"temp_id": "M_M_001",
|
||||
"monster_code": "木萌妖-01",
|
||||
"skills": [
|
||||
{
|
||||
"positioning": "子弹飞行速度射击高频",
|
||||
"name": "高速射击",
|
||||
"effects": {
|
||||
"level_1": "子弹飞行速度增加30%",
|
||||
"level_2": "伤害提升15%",
|
||||
"level_3": "对小型敌人增加40%伤害,攻击CD增加5%",
|
||||
"level_4": "伤害提升35%",
|
||||
"level_5": "每次攻击增加20%暴击率,射程减少1格"
|
||||
}
|
||||
},
|
||||
{
|
||||
"positioning": "精准子弹",
|
||||
"name": "精制子弹",
|
||||
"effects": {
|
||||
"level_1": "攻击CD减少25%",
|
||||
"level_2": "伤害提升15%",
|
||||
"level_3": "对小型敌人增加25%伤害,射程减少1格",
|
||||
"level_4": "伤害提升35%",
|
||||
"level_5": "每次攻击增加20%暴击率,攻击CD增加5%"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
@ -1,7 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 8812465f0ea2ff64da18bb16c925e8f5
|
||||
TextScriptImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -311,6 +311,7 @@ MonoBehaviour:
|
||||
- {fileID: 0}
|
||||
- {fileID: 0}
|
||||
moveSpeed: 1
|
||||
speedFactor: 1
|
||||
obj: {fileID: 4703411402842800732}
|
||||
--- !u!114 &4703411402755586929
|
||||
MonoBehaviour:
|
||||
@ -327,6 +328,7 @@ MonoBehaviour:
|
||||
retbutton: {fileID: 0}
|
||||
ClosureObj: {fileID: 0}
|
||||
id: 0
|
||||
Name:
|
||||
camp: 1
|
||||
hp: 100
|
||||
dieIndex: 1
|
||||
@ -336,7 +338,18 @@ MonoBehaviour:
|
||||
_Canvas: {fileID: 4205844203331515742}
|
||||
spriteRenderers: {fileID: 4703411402842800734}
|
||||
HurtDirectin: 0
|
||||
Quality:
|
||||
Elements:
|
||||
Info:
|
||||
SkillId:
|
||||
AttackType:
|
||||
AttackActionType:
|
||||
AttackCD: 0
|
||||
CritRate: 0
|
||||
CriticalHitRateBonus: 0
|
||||
gold: 10
|
||||
MaxAttack: 10
|
||||
MinAttack: 10
|
||||
physicalArmor: 10
|
||||
magicArmor: 5
|
||||
Navigation: {fileID: 4703411402755586928}
|
||||
@ -495,6 +508,8 @@ MonoBehaviour:
|
||||
role: {fileID: 4703411402755586929}
|
||||
panelPrefab: {fileID: 103310189314411435, guid: 750dbc96a3815eb4c85c7f89c206a43f, type: 3}
|
||||
attackRange: {fileID: 0}
|
||||
isShowPanel: 0
|
||||
instantiatedPanel: {fileID: 0}
|
||||
--- !u!1 &4703411402469012869
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -599,7 +614,7 @@ SpriteRenderer:
|
||||
m_SortingLayerID: 0
|
||||
m_SortingLayer: 0
|
||||
m_SortingOrder: 0
|
||||
m_Sprite: {fileID: 21300000, guid: 97cc9a8eaafc8d24a849cc7f6ceb3b13, type: 3}
|
||||
m_Sprite: {fileID: 21300000, guid: 5a21d33cca7048a46aed91d4e3e32ec3, type: 3}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_FlipX: 0
|
||||
m_FlipY: 0
|
||||
|
@ -4397,10 +4397,10 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: ef2ffa387be5c84478c8cf2baec66c02, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Asset: {fileID: 4900000, guid: ccad03cd6f4f0ab44a344e0a34526ef7, type: 3}
|
||||
NameAsset: {fileID: 4900000, guid: 52acabe0a2e08eb4ea9d762d220531e8, type: 3}
|
||||
LevelAsset: {fileID: 4900000, guid: bb3d00dd8f76e124faa356d8394be29a, type: 3}
|
||||
SkillAsset: {fileID: 4900000, guid: a8003fd7bb7ee3f4da293b457be01220, type: 3}
|
||||
m_Asset: {fileID: 4900000, guid: 6a6cdf5342b444d4fbff4fccbb54f98a, type: 3}
|
||||
NameAsset: {fileID: 4900000, guid: e414de6ecc2f57d4ba107a5433dd54f5, type: 3}
|
||||
LevelAsset: {fileID: 4900000, guid: 89bbacca41b409b4dbf238a43bbb2e4b, type: 3}
|
||||
SkillAsset: {fileID: 4900000, guid: 3d441bff04ee5a64ea8b8967bcfbc070, type: 3}
|
||||
m_Level: []
|
||||
--- !u!1 &1342038372
|
||||
GameObject:
|
||||
|
@ -83,7 +83,7 @@ public class Prompt_box_generation : MonoBehaviour
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.Log(hintRectTransform.rect.width);
|
||||
//Debug.Log(hintRectTransform.rect.width);
|
||||
// 如果图标在左边,则将提示框放到图标的右侧
|
||||
hintRectTransform.position = new Vector3((iconPosition.x+ iconRectTransform.rect.width / 2) + hintRectTransform.rect.width/2, iconPosition.y+ 120f- iconRectTransform.rect.height / 2, iconPosition.z);
|
||||
}
|
||||
|
@ -1,6 +1,7 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEngine.Rendering;
|
||||
|
||||
public class ObJPool<T>
|
||||
{
|
||||
@ -87,17 +88,16 @@ public class SpawnPool : Base
|
||||
}
|
||||
public void UpdateNodeList()
|
||||
{
|
||||
// 获取所有带有 SpriteRenderer 组件的子物体
|
||||
// 获取所有带有 SortingGroup 组件的物体
|
||||
List<GameObject> gameObjectsList = new List<GameObject>();
|
||||
|
||||
foreach (GameObject go in EnemyPool.SurvivalPool)
|
||||
{
|
||||
// 获取所有子物体中具有 SpriteRenderer 组件的物体
|
||||
SpriteRenderer renderer = go.GetComponentInChildren<SpriteRenderer>();
|
||||
if (renderer != null)
|
||||
// 获取该物体上的 SortingGroup 组件
|
||||
SortingGroup sortingGroup = go.GetComponent<SortingGroup>();
|
||||
if (sortingGroup != null)
|
||||
{
|
||||
// 添加到列表中
|
||||
//Debug.Log("排序添加--------");
|
||||
gameObjectsList.Add(go);
|
||||
}
|
||||
}
|
||||
@ -105,16 +105,14 @@ public class SpawnPool : Base
|
||||
// 按照 y 轴排序
|
||||
gameObjectsList.Sort((a, b) => a.transform.position.y.CompareTo(b.transform.position.y));
|
||||
|
||||
// 设置 sortingOrder
|
||||
// 设置 SortingGroup 的 sortingOrder
|
||||
for (int i = 0; i < gameObjectsList.Count; i++)
|
||||
{
|
||||
SpriteRenderer renderer = gameObjectsList[i].GetComponentInChildren<SpriteRenderer>();
|
||||
if (renderer != null)
|
||||
SortingGroup sortingGroup = gameObjectsList[i].GetComponent<SortingGroup>();
|
||||
if (sortingGroup != null)
|
||||
{
|
||||
// 设置 sortingOrder 来决定显示的层级
|
||||
|
||||
renderer.sortingOrder = gameObjectsList.Count-i;
|
||||
//Debug.Log("排序--------");
|
||||
sortingGroup.sortingOrder = gameObjectsList.Count - i;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user