public override void Ready() { Transform tComponen = UnityEngine.Object.Instantiate(FloorManager.Instance.NanatoPrefab, new Vector3(X, Y, ZPos), Quaternion.identity) as Transform; tComponen.gameObject.name = Name; PlyUnitControl taskCtl = tComponen.gameObject.GetComponent(typeof(PlyUnitControl)) as PlyUnitControl; //taskCtl.Index = this.Index; taskCtl._OnCheckLiftUpOK = new CheckHandler(OnCheckLiftUpOK); taskCtl._OnReportDragDrop = new ReportDropHandler(OnDragDrop); base.Ready(); }
public void Ready_Peace() { Transform Prefab = null; switch (Type) { case MagiPeaceType.MagiPeace01: Prefab = FloorManager.Instance.MagiPeace01Prefab; break; } Transform tComponen = UnityEngine.Object.Instantiate(Prefab, new Vector3(X, Y, ZPos), Quaternion.identity) as Transform; tComponen.gameObject.name = Name; PlyUnitControl unitCtl = tComponen.gameObject.GetComponent(typeof(PlyUnitControl)) as PlyUnitControl; unitCtl._OnCheckLiftUpOK = new CheckHandler(OnCheckLiftUpOK); unitCtl._OnReportDragDrop = new ReportDropHandler(OnDragDrop); }