Merge branch 'main' of http://shu.sheziwanglo.cn:3000/shurongsen/Cute_demon_attacks
This commit is contained in:
commit
6eb7d4b28b
@ -841,7 +841,7 @@ Transform:
|
||||
- {fileID: 995271151}
|
||||
- {fileID: 1932457213}
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 8
|
||||
m_RootOrder: 9
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!114 &284432671
|
||||
MonoBehaviour:
|
||||
@ -1570,7 +1570,7 @@ Transform:
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 7
|
||||
m_RootOrder: 8
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!114 &459650026
|
||||
MonoBehaviour:
|
||||
@ -5919,6 +5919,71 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: 97664c5246bb0d242997921b3560d036, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
retbutton: {fileID: 0}
|
||||
ClosureObj: {fileID: 0}
|
||||
--- !u!1 &1910338484
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1910338485}
|
||||
- component: {fileID: 1910338487}
|
||||
- component: {fileID: 1910338486}
|
||||
m_Layer: 0
|
||||
m_Name: Infos
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &1910338485
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1910338484}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 524.29224, y: 1319.394, z: -1.7705407}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 7
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!114 &1910338486
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1910338484}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: f6c570b2c3c14994fa8337757d1d492e, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
mengyaoItems: []
|
||||
instane: {fileID: 0}
|
||||
--- !u!114 &1910338487
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1910338484}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 3ee6cb1a8b4020040bddd9c037e404b4, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
monsters:
|
||||
- id:
|
||||
prefab: {fileID: 4703411402065954783, guid: aac4ad2c72526a54691494dd54e115a6, type: 3}
|
||||
instance: {fileID: 0}
|
||||
--- !u!1 &1932457212
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
24
meng_yao/Assets/script/A_Fight/MY_Infos.cs
Normal file
24
meng_yao/Assets/script/A_Fight/MY_Infos.cs
Normal file
@ -0,0 +1,24 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
[System.Serializable]
|
||||
public class mengyaoInfo
|
||||
{
|
||||
public string id;
|
||||
public Sprite imge;
|
||||
public Sprite cardimge;
|
||||
public GameObject prefab;
|
||||
}
|
||||
|
||||
public class MY_Infos : MonoBehaviour
|
||||
{
|
||||
public List<mengyaoInfo> mengyaoItems=new List<mengyaoInfo>();
|
||||
|
||||
public MY_Infos instane;
|
||||
void Awake()
|
||||
{
|
||||
instane = this;
|
||||
}
|
||||
|
||||
}
|
11
meng_yao/Assets/script/A_Fight/MY_Infos.cs.meta
Normal file
11
meng_yao/Assets/script/A_Fight/MY_Infos.cs.meta
Normal file
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f6c570b2c3c14994fa8337757d1d492e
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
23
meng_yao/Assets/script/A_Fight/Monster_Infos.cs
Normal file
23
meng_yao/Assets/script/A_Fight/Monster_Infos.cs
Normal file
@ -0,0 +1,23 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
[System.Serializable]
|
||||
public class monster
|
||||
{
|
||||
public string id;
|
||||
public GameObject prefab;
|
||||
|
||||
}
|
||||
|
||||
public class Monster_Infos : MonoBehaviour
|
||||
{
|
||||
public List<monster> monsters = new List<monster>();
|
||||
public Monster_Infos instance;
|
||||
|
||||
void Awake()
|
||||
{
|
||||
instance = this;
|
||||
}
|
||||
}
|
||||
|
11
meng_yao/Assets/script/A_Fight/Monster_Infos.cs.meta
Normal file
11
meng_yao/Assets/script/A_Fight/Monster_Infos.cs.meta
Normal file
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 3ee6cb1a8b4020040bddd9c037e404b4
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
98
meng_yao/Assets/script/A_Fight/SpawnMonster.cs
Normal file
98
meng_yao/Assets/script/A_Fight/SpawnMonster.cs
Normal file
@ -0,0 +1,98 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEngine.Rendering;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public class SpawnMonster : Base
|
||||
{
|
||||
public static SpawnMonster intance;
|
||||
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
intance = this;
|
||||
}
|
||||
|
||||
void Start()
|
||||
{
|
||||
Base.GlobalObj.GetComponent<gameGlobal>().OnGamePlay += this.StartSpawning;
|
||||
}
|
||||
|
||||
|
||||
/*public void UpdateNodeList()
|
||||
{
|
||||
// 获取所有带有 SortingGroup 组件的敌人对象
|
||||
List<GameObject> gameObjectsList = new List<GameObject>();
|
||||
|
||||
foreach (GameObject go in Enemys)
|
||||
{
|
||||
// 获取该物体上的 SortingGroup 组件
|
||||
if (go != null)
|
||||
{
|
||||
SortingGroup sortingGroup = go.GetComponent<SortingGroup>();
|
||||
if (sortingGroup != null && go.activeSelf)
|
||||
{
|
||||
// 添加到列表中
|
||||
gameObjectsList.Add(go);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// 按照 y 轴排序
|
||||
gameObjectsList.Sort((a, b) => a.transform.position.y.CompareTo(b.transform.position.y));
|
||||
|
||||
// 设置 SortingGroup 和子 Canvas 的 sortingOrder
|
||||
for (int i = 0; i < gameObjectsList.Count; i++)
|
||||
{
|
||||
SortingGroup sortingGroup = gameObjectsList[i].GetComponent<SortingGroup>();
|
||||
if (sortingGroup != null)
|
||||
{
|
||||
// 计算排序顺序
|
||||
int order = gameObjectsList.Count - i + 2;
|
||||
sortingGroup.sortingOrder = order;
|
||||
|
||||
// 获取子 Canvas 并设置其 sortingOrder
|
||||
Canvas canvas = gameObjectsList[i].GetComponentInChildren<Canvas>();
|
||||
if (canvas != null)
|
||||
{
|
||||
canvas.sortingOrder = order;
|
||||
}
|
||||
}
|
||||
}
|
||||
}*/
|
||||
|
||||
|
||||
|
||||
void Update()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
public void StartSpawning()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void GenerateEnemy()
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
private void OnDisable()
|
||||
{
|
||||
Base.GlobalObj.GetComponent<gameGlobal>().OnGamePlay -= this.StartSpawning;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
11
meng_yao/Assets/script/A_Fight/SpawnMonster.cs.meta
Normal file
11
meng_yao/Assets/script/A_Fight/SpawnMonster.cs.meta
Normal file
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 97664c5246bb0d242997921b3560d036
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -34,6 +34,7 @@ public class ObJPool<T>
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public class SpawnPool : Base
|
||||
{
|
||||
public static SpawnPool intance;
|
||||
|
@ -30,6 +30,11 @@ public class Islandpanel : MonoBehaviour
|
||||
introtext.text = response.Data.intro_text;
|
||||
InvesttotalText.text = response.Data.invest_total.ToString();
|
||||
remainingTime = response.Data.countdown;
|
||||
if(response.Data.island_id==0)
|
||||
{
|
||||
Dao.gameObject.SetActive(false);
|
||||
islandname.gameObject.SetActive(false);
|
||||
}
|
||||
islandname.text = response.Data.island_name;
|
||||
UpdateCountdownText(remainingTime);
|
||||
Dao.sprite = dao[response.Data.island_id];
|
||||
|
Loading…
Reference in New Issue
Block a user