public AloneBattleBillboard() { m_font = BillboardViewManager.Instance.GetBattleBillboardFont(); //AssetCacheMgr.GetUIInstance("AloneBattleBillboard.prefab", (prefab, guid, gameObject) => //{ // m_goBillboard = (GameObject)gameObject; // m_goBillboard.SetActive(false); // m_goBillboard.transform.parent = GameObject.Find("MogoMainUIPanel").transform.FindChild("BillboardList").transform; // m_goBillboard.AddComponent<BattleBillboardAnim>().IsPoolObject = false; // m_goBillboard.transform.localPosition = Vector3.zero; // m_goBillboard.transform.localScale = new Vector3(1, 1, 1); // m_goBillboard.transform.localEulerAngles = Vector3.zero; // TruelyAddBillbarodText(); // TruelySetBillboardPos(); // m_bIsLoaded = true; //}); int id = BillboardViewManager.Instance.DictPoolTypeToID[MaiFeoMemoryPoolType.PoolType_AloneBattleBillobard]; m_goBillboard = MaiFeoMemoryPoolManager.GetSingleton().GetPoolByID(id).GetOne(); //m_goBillboardList = m_goBillboard.transform.FindChild("BillboardList").gameObject; m_goBillboard.transform.parent = GameObject.Find("MogoMainUIPanel").transform.FindChild("BattleBillboardList").transform; m_goBillboard.transform.localPosition = new Vector3(0, 0, 0); m_goBillboard.transform.localScale = new Vector3(1, 1, 1); m_goBillboard.transform.localEulerAngles = new Vector3(0, 0, 0); m_bIsLoaded = true; m_tp = m_goBillboard.GetComponentsInChildren <TweenPosition>(true)[0]; }
void FadeFinished() { //Destroy(gameObject); if (IsPoolObject) { MaiFeoMemoryPoolManager.GetSingleton().GetPoolByID(BillboardViewManager.Instance.DictPoolTypeToID[MaiFeoMemoryPoolType.PoolType_SplitBattleBillboard]).ReturnOne(gameObject); //Mogo.Util.LoggerHelper.Debug("FadeFinished!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"); } else { Destroy(gameObject); } }
public SplitBattleBillboard() { m_listSprite = new List <UISprite>(); m_atlas = BillboardViewManager.Instance.GetBattleBillboardAtlas(); int id = BillboardViewManager.Instance.DictPoolTypeToID[MaiFeoMemoryPoolType.PoolType_SplitBattleBillboard]; m_goBillboard = MaiFeoMemoryPoolManager.GetSingleton().GetPoolByID(id).GetOne(); m_goBillboardList = m_goBillboard.transform.Find("BillboardList").gameObject; m_goBillboard.transform.parent = GameObject.Find("MogoMainUIPanel").transform.Find("BattleBillboardList").transform; m_goBillboard.transform.localPosition = new Vector3(0, 0, 0); m_goBillboard.transform.localScale = new Vector3(1, 1, 1); m_goBillboard.transform.localEulerAngles = new Vector3(0, 0, 0); m_bIsLoaded = true; ReCalculateBillboardCenter(); }
void Awake() { m_instance = transform.GetComponentsInChildren <BillboardViewManager>(true)[0]; m_stage = transform.FindChild("Anchor/MogoMainUIPanel/BillboardList"); //EventDispatcher.AddEventListener<Vector3, uint>(BillboardViewEvent.UPDATEBILLBOARDPOS, OnUpdateBillboardPos); //EventDispatcher.AddEventListener<float, uint>(BillboardLogicManager.BillboardLogicEvent.SETBILLBOARDBLOOD, OnSetBillboardBlood); //EventDispatcher.AddEventListener<string, uint>(BillboardLogicManager.BillboardLogicEvent.UPDATEBILLBOARDNAME, OnSetBillboardName); EventDispatcher.AddEventListener <string, uint>(BillboardLogicManager.BillboardLogicEvent.UPDATEBILLBOARDTONG, OnSetBillboardTong); GetBattleBillboardAtlas(); GetBattleBillboardFont(); DictPoolTypeToID.Add(MaiFeoMemoryPoolType.PoolType_SplitBattleBillboard, MaiFeoMemoryPoolManager.GetSingleton().CreatePool(MaiFeoMemoryPoolType.PoolType_SplitBattleBillboard, 5)); DictPoolTypeToID.Add(MaiFeoMemoryPoolType.PoolType_SuperBattleBillboard, MaiFeoMemoryPoolManager.GetSingleton().CreatePool(MaiFeoMemoryPoolType.PoolType_SuperBattleBillboard, 5)); DictPoolTypeToID.Add(MaiFeoMemoryPoolType.PoolType_AloneBattleBillobard, MaiFeoMemoryPoolManager.GetSingleton().CreatePool(MaiFeoMemoryPoolType.PoolType_AloneBattleBillobard, 5)); }
public SuperBattleBillboard() { m_atlas = BillboardViewManager.Instance.GetBattleBillboardAtlas(); m_listSprite = new List <UISprite>(); //AssetCacheMgr.GetUIInstance("SuperBattleBillboard.prefab", (prefab, guid, gameObject) => //{ // m_goBillboard = (GameObject)gameObject; // m_goBillboardList = m_goBillboard.transform.FindChild("BillboardList").gameObject; // m_goBillboard.transform.parent = GameObject.Find("MogoMainUIPanel").transform.FindChild("BillboardList").transform; // m_goBillboard.transform.localPosition = new Vector3(0, 0, 0); // m_goBillboard.transform.localScale = new Vector3(1, 1, 1); // m_goBillboard.transform.localEulerAngles = new Vector3(0, 0, 0); // TruelyAddBattleBillboardNum(); // TruelyAddBattleBillboardSign(); // TruelySetBillboardPos(); // m_bIsLoaded = true; // ReCalculateBillboardCenter(); //}); int id = BillboardViewManager.Instance.DictPoolTypeToID[MaiFeoMemoryPoolType.PoolType_SuperBattleBillboard]; m_goBillboard = MaiFeoMemoryPoolManager.GetSingleton().GetPoolByID(id).GetOne(); m_goBillboardList = m_goBillboard.transform.FindChild("BillboardList").gameObject; m_goBillboard.transform.parent = GameObject.Find("MogoMainUIPanel").transform.FindChild("BattleBillboardList").transform; m_goBillboard.transform.localPosition = Vector3.zero; m_goBillboard.transform.localScale = new Vector3(1, 1, 1); m_goBillboard.transform.localEulerAngles = Vector3.zero; m_bIsLoaded = true; ReCalculateBillboardCenter(); }
void FadeFinished() { MaiFeoMemoryPoolManager.GetSingleton().GetPoolByID(BillboardViewManager.Instance.DictPoolTypeToID[MaiFeoMemoryPoolType.PoolType_SuperBattleBillboard]).ReturnOne(gameObject); }