using AX.MessageSystem; using System.Collections; using System.Collections.Generic; using UnityEngine; /// /// 克隆游戏对象信息基类 /// public class CloneGameObjInfo : BaseGameObjInfo { public string buildNum;//楼号 public int floorNum;//层号 public int interlayerNum;//夹层号,0表示不是夹层,1表示第一个夹层 public int Layer; /// /// 显示or隐藏 /// public bool ShoworHidden; public string FullName; private void Awake() { Layer = gameObject.layer; } public virtual void Start() { PowerScroll.GetPower += HandOverablePowerCheck; OwnerPanel.GetOnesPower += HandOverablePowerCheck; } public virtual void OnDestroy() { PowerScroll.GetPower -= HandOverablePowerCheck; OwnerPanel.GetOnesPower -= HandOverablePowerCheck; } public virtual string GetObjectName() { return CloneObjTypeName.Instance.GetCloneNameByType(gameObjType); } private List HandOverablePowerCheck(long userID,List powerList) { if (UserID == userID && (GetComponent() || GetComponent())) { powerList.Add(gameObject); return powerList; } else { return powerList; } } }