public void EventArgs() { var timer = new Timer() { Name = "MyTimer"}; timer.Starting += TimerOnStarting; timer.Start(); }
public override void OnShow() { base.OnShow(); GameObject rankItemPrefab = ResourceManager.Instance.GetModelPrefebByName("HallRankItem.prefab"); for(int i=0; i<5; i++) { GameObject gridItem = NGUITools.AddChild(m_Grid.gameObject, rankItemPrefab); } mGridGrid.repositionNow = true; m_GirlEyeAnimTimer = new Timer(4f); m_GirlEyeAnimTimer.Elapsed += GirlEyeAnimHandler; m_GirlEyeAnimTimer.Start(); TimerManager.Instance.AddTimer(m_GirlEyeAnimTimer); }
private IEnumerator StartFrameTimer() { yield return new WaitForEndOfFrame(); Timer frameTimer = new Timer(0.2f); frameTimer.Elapsed += GirlEyeFrameHandler; frameTimer.Start(); TimerManager.Instance.AddTimer(frameTimer); yield return null; }
private void OnGirlClick() { m_FaceRed.gameObject.SetActive(true); m_MouthClose.gameObject.SetActive(true); m_MouthHalf.gameObject.SetActive(false); m_EyeClose.gameObject.SetActive(true); m_EyeHalf.gameObject.SetActive(false); Timer timer = new Timer(0.2f); timer.Elapsed += GirlFaceHandler; timer.Start(); TimerManager.Instance.AddTimer(timer); m_FaceIndex = 1; m_GirlEyeTimerRunning = false; }