public void initm_minimap_camara() { camGo = GameObject.Find("camera_camera_minimap(Clone)"); if (m_minimap_camara == null) { GameObject temogo = GAMEAPI.ABUI_LoadPrefab("camera_camera_minimap"); camGo = GameObject.Instantiate(temogo) as GameObject; Application.DontDestroyOnLoad(camGo); SceneCamera.refreshMiniMapCanvas(); //临时 } m_minimap_camara = camGo.transform.FindChild("camera").GetComponent <Camera>(); RectTransform trans = GameObject.Find("camcon").GetComponent <RectTransform>(); Vector3 pos0 = trans.position; camGo.transform.SetParent(this.transform); camGo.transform.SetAsFirstSibling(); float w = (Baselayer.uiWidth + trans.anchoredPosition.x - trans.rect.width) / Baselayer.uiWidth; float h = (Baselayer.uiHeight + trans.anchoredPosition.y - trans.rect.height) / Baselayer.uiHeight; Vector3 pos1 = InterfaceMgr.ui_Camera_cam.WorldToScreenPoint(pos0); m_minimap_camara.rect = new UnityEngine.Rect(w, h, trans.sizeDelta.x / Baselayer.uiWidth, trans.sizeDelta.y / Baselayer.uiHeight); refreshMiniCam(); }
virtual public void onStart(Variant conf) { if (started) { return; } started = true; instance = this; dDropItem = new Dictionary <uint, DropItem>(); dDropItem_own = new Dictionary <uint, DropItem>(); dDropFakeItem = new Dictionary <uint, DropItem>(); dPickItem = new Dictionary <uint, DropItem>(); clearlist(); svrConf = conf; fakeItemIdx = 0; SceneCamera.refreshMiniMapCanvas(); process = new TickItem(onTick); TickMgr.instance.addTick(process); initRoomObj(); if (a1_gamejoy.inst_skillbar) { a1_gamejoy.inst_skillbar.clearCD(); } goldnum = 0; expnum = PlayerModel.getInstance().exp; lvl = PlayerModel.getInstance().lvl; zhuan = PlayerModel.getInstance().up_lvl; a3_fb_finish.room = this; }
public virtual void onStart(Variant conf) { bool flag = this.started; if (!flag) { this.started = true; BaseRoomItem.instance = this; this.dDropItem = new Dictionary <uint, DropItem>(); this.dDropItem_own = new Dictionary <uint, DropItem>(); this.dDropFakeItem = new Dictionary <uint, DropItem>(); this.svrConf = conf; this.fakeItemIdx = 0u; SceneCamera.refreshMiniMapCanvas(); this.process = new TickItem(new Action <float>(this.onTick)); TickMgr.instance.addTick(this.process); this.initRoomObj(); this.goldnum = 0u; this.expnum = ModelBase <PlayerModel> .getInstance().exp; this.lvl = ModelBase <PlayerModel> .getInstance().lvl; this.zhuan = ModelBase <PlayerModel> .getInstance().up_lvl; a3_fb_finish.room = this; } }