void Awake() { instance = this; currentTime = Time.time; lastStatus = m_lightStatus; }
// Use this for initialization protected void Start() { //事件绑定 eve_Win += DisPlayDxResult.getInstance().onBdxWin; eve_Lose += DisPlayDxResult.getInstance().onBdxLose; eve_Win += NewLightsBlink.getInstance().onWinLights; eve_Lose += NewLightsBlink.getInstance().onLoseLights; eve_run += NewLightsBlink.getInstance().onRunLights; eve_End += NewLightsBlink.getInstance().onEndLights; eve_shakeBtnFrame += NewLightsBlink.getInstance().CtrlBtnFrameShake; _itemAnimState = ItemAnimState.Sleep; foreach (var item in LightItems) { item.SetActive(false); } //for (int i = 0; i < LightItems.Length; i++) //{ // LightItems[i].SetActive(false); //} LightItems[0].GetComponent <Image>().rectTransform.localPosition = new Vector3(_boxPosList[0], _boxPosList[1]); _startBtn = GameObject.Find("startButton"); //绑定开始按钮 EventTriggerListener.Get(_startBtn).OnClick = OnStartClick; //绑定加倍减半按钮 EventTriggerListener.Get(HalfBtn).OnClick = OnHalfBtnClick; EventTriggerListener.Get(DoublBtn).OnClick = OnDoubleBtnClick; EventTriggerListener.Get(ClearBtn).OnClick = OnClearBtnClick; _btnBig = GameObject.Find("btn_big"); _btnSmall = GameObject.Find("btn_Small"); //比大小按钮 EventTriggerListener.Get(_btnBig).OnClick = OnBtnBigClick; EventTriggerListener.Get(_btnSmall).OnClick = OnBtnSmallClick; //slotInfo.GameState = itemAnimState;//获得游戏当前的状态 InitGoodLuckAnimBoxes(); }
// Use this for initialization void Start() { eve_CancleDisplayResult += NewLightsBlink.getInstance().onIdleLights; }