'1'
This commit is contained in:
commit
83e0ee0957
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
*.meta
|
37
Managers/BattleMgr.cs
Normal file
37
Managers/BattleMgr.cs
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
using UnityEngine;
|
||||||
|
using LuaFramework;
|
||||||
|
|
||||||
|
public class BattleMgr
|
||||||
|
{
|
||||||
|
|
||||||
|
public static void StartBattle(JoinInfo join_info)
|
||||||
|
{
|
||||||
|
//CUILoading.OpenLoading();
|
||||||
|
//CUILoading.SetLoading(0);
|
||||||
|
GameObject fightRootObject = new GameObject("fight");
|
||||||
|
{
|
||||||
|
fightRootObject.transform.parent = LuaHelper.GetGameManager().m_pGameMap.transform;
|
||||||
|
fightRootObject.layer = CUtil.WorldMapLayer_0_31;
|
||||||
|
}
|
||||||
|
GameObject mapObj = new GameObject("map");
|
||||||
|
{
|
||||||
|
mapObj.transform.parent = fightRootObject.transform;
|
||||||
|
mapObj.layer = CUtil.WorldMapLayer_0_31;
|
||||||
|
TransformExtension.localPosition(mapObj.transform, 0, 0, 0);
|
||||||
|
TransformExtension.localScale(mapObj.transform, 1, 1, 1);
|
||||||
|
}
|
||||||
|
var mapBase = LuaHelper.GetResManager().LoadPrefab<GameObject>("map16", "Data/model/mapterrain/", "model/mapterrain");
|
||||||
|
{
|
||||||
|
var t = CUtil.AddChild(mapObj, mapBase, true);
|
||||||
|
TransformExtension.localEulerAngles(t.transform, 0, 0, 0);
|
||||||
|
TransformExtension.localPosition(t.transform, 0, 0, 0);
|
||||||
|
}
|
||||||
|
{
|
||||||
|
var terrainName = "1_" + "map16";
|
||||||
|
var terrainObj = LuaHelper.GetResManager().LoadPrefab<GameObject>(terrainName, "Data/model/mapterrain/", "model/mapterrain");
|
||||||
|
terrainObj.localEulerAngle(terrainObj.tanasform, 0, 0, 0);
|
||||||
|
terrainObj.localPosition(terrainObj.transfrom, 0, 0, 0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user