protected internal override void OnEnter(ProcedureOwner procedureOwner) { base.OnEnter(procedureOwner); DBTSDK.AppUserManager.Instance.ShowAntiAddiction(true, 1); MsgDispatcher.AddEventListener(GameFramework.GlobalEventType.MainPanel_StartGame, MainPanel_StartGame); ShowMainPanelOrStarGame(); }
void Start() { InputManager.AddTouchBeginListener(TouchBegin); InputManager.AddTouchMoveListener(TouchMove); InputManager.AddTouchEndListener(TouchEnd); MsgDispatcher.AddEventListener(TheSecondWorld.GlobalEventType.GetRotation, GetRotation); transform.localRotation = Quaternion.Euler(TaskSystem.TaskCtrl.I.GetRotation()); transform.localPosition = modelPos; DontDestroyOnLoad(transform.parent.gameObject); }
/// <summary>添加事件监听</summary> override protected void Awake() { MsgDispatcher.AddEventListener(TheSecondWorld.GlobalEventType.NowRotation, ShowRotation); offset = InfoItem.GetComponent <RectTransform>().sizeDelta.x; targetPosList = new List <Vector3>(); for (int i = 0; i < Grid.transform.childCount; i++) { targetPosList.Add(Grid.transform.GetChild(i).localPosition); } itemList = new List <InfoItem>(); for (int i = 0; i < itemNum; i++) { InfoItem item = new InfoItem(); item.Instantiate(InfoItem, Root.transform); item.transform.localPosition = new Vector3(-offset, targetPosList[i].y, 0); item.transform.DOLocalMove(targetPosList[i], 1).SetEase(Ease.OutBack).SetDelay(i * 0.1f); itemList.Add(item); } MsgDispatcher.SendMessage(TheSecondWorld.GlobalEventType.GetRotation); }
void AddListener() { MsgDispatcher.AddEventListener(GlobalEventType.TaskFinish, TaskFinish); }
void AddListener() { MsgDispatcher.AddEventListener(GlobalEventType.RefreshTask, RefreshTask); }
private void Init() { MsgDispatcher.AddEventListener(GlobalEventType.CHANGE_RESULT, ChangeResult); InitCombo(); ReflashView(); }