private void OnMovePilesTopFinished() { GameObject obj = m_ElementList[m_iMovingPilesIndex].m_ObjRoot; TweenPosition tween = obj.GetComponent <TweenPosition>(); Destroy(tween); m_UIWindow.OnEnableOption(m_strCuringCaculateName); m_strCuringCaculateName = string.Empty; TriggerToShowDisableOption(m_ElementList[m_iMovingPilesIndex].m_OptionRoot, () => { m_ElementList[m_iMovingPilesIndex].m_Materials.mainTexture = ResourceManager.Instance.LoadBuildInResource <Texture2D>(m_strEmptyTextureName, AssetType.Texture); m_bIsMovingPiles = false; if (m_iLeftRedFlower <= 0) { //trigger to end game m_UIWindow.OnLose(); m_bIsFinished = true; m_DiffMgr.ReportEvent(RegularityGameDifficultyManager.RegularityEventType.Lose); } }); }
private void OnJumpFinished() { if (m_bIsCorrect) { ReportCorrectEvent(); --m_iLeftWinCount; if (m_iLeftWinCount <= 0) { //show window m_DiffMgr.ReportEvent(RegularityGameDifficultyManager.RegularityEventType.Win); ChangeToStatus(RegularityStatus.Win); m_UIWindow.OnWin(); } else { ReloadScene(); } } else { ReportWrongEvent(); --m_iLeftRedFlower; m_UIWindow.SetLeftFlower(m_iLeftRedFlower); if (m_iLeftRedFlower <= 0) { m_DiffMgr.ReportEvent(RegularityGameDifficultyManager.RegularityEventType.Lose); ChangeToStatus(RegularityStatus.Lose); m_UIWindow.OnLose(); } else { //jump back TriggerJumpToTarget(--m_iCurrentJumpedIndex); ChangeToStatus(RegularityStatus.Repostion); TriggerToShowPilesAnim(); } } }