You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

22 lines
934 B

using UnityEngine;
namespace ET
{
public class AfterUnitCreate_CreateUnitView: AEvent<EventType.AfterUnitCreate>
{
protected override void Run(EventType.AfterUnitCreate args)
{
// Unit View层
// 这里可以改成异步加载,demo就不搞了
// GameObject bundleGameObject = (GameObject)ResourcesComponent.Instance.GetAsset("Unit.unity3d", "Unit");
// GameObject prefab = bundleGameObject.Get<GameObject>("Skeleton");
//
// GameObject go = UnityEngine.Object.Instantiate(prefab, GlobalComponent.Instance.Unit, true);
// go.transform.position = args.Unit.Position;
// args.Unit.AddComponent<GameObjectComponent>().GameObject = go;
// args.Unit.AddComponent<AnimatorComponent>();
Unit unit = args.Unit;
var currentScene = unit.ZoneScene().CurrentScene();
}
}
}