/// <summary> /// change animation state /// </summary> /// <param name="animParam"></param> protected override void ChangeAnim(AnimStateBase state) { List <PlayAnimParam> animParam = ((AnimState)state).playAnimParams; string aniTemp = ""; for (int i = 0; i < animParam.Count; i++) { PlayAnimParam param = (PlayAnimParam)animParam[i]; string aniName = param.aniName; if (m_anim[aniName] != null) { m_anim[aniName].wrapMode = param.warpMode; if (param.isForcePlay) { m_anim.CrossFade(aniName, param.fadeLength); } else { m_anim.CrossFadeQueued(aniName, param.fadeLength); } aniTemp += "/" + aniName; } } Debug.Log("#Animation# Play Anim : " + aniTemp); }
int _OnNetworkError(string desc) { _continuousNetworkErrorCnt++; Debug.Log("_OnNetworkError : " + desc + " _continuousNetworkErrorCnt: " + _continuousNetworkErrorCnt); _errorDesc = desc; if (_continuousNetworkErrorCnt == 1) { // 연속 1회는 자동 재시도 _errorDesc = null; _stateToRetry = _state; _ChangeState(State.WaitRetry); return(1); } else if (_continuousNetworkErrorCnt >= 2) { if (_continuousNetworkErrorCnt == 2) { _stateToRetry = _state; // 연속 2회는 재시도 확인창 _ChangeState(State.ConfirmRetry); } return(2); } return(0); }
void AnimEvent_PlaySfxGroup(string active_group) { string szSeparateExt = ";"; string[] v = active_group.Split(szSeparateExt.ToCharArray()); Debug.Assert(v.Length >= 2, "AnimEvent_ActiveSfxGroup is invalid : " + active_group); bool active = false; active = (v.Length < 2) ? true : (v[1].Equals("true") ? true : false); SetParam(v[0], delegate(GameObject go) { if (go != null) { Debug.Log("Active Sfx Group : " + active_group + " frameCount : " + Time.frameCount); if (active) { SendEventToOwner(SfxEventType.ActiveSfxGroup, v[0]); } else { SendEventToOwner(SfxEventType.DeActiveSfxGroup, v[0]); } } }); }
public static bool EntityUnSetting(EA_CObjectBase pDelObjBase) { if (pDelObjBase != null) { if (pDelObjBase.GetObjInfo().m_eObjState == eObjectState.CS_SETENTITY) { // [3/6/2014 puos] entity unsetting error check Debug.Log("EntityUnSetting error : " + pDelObjBase.GetObjInfo().m_strGameName); return(false); } GameObject pGameObject = pDelObjBase.GetLinkEntity(); if (pGameObject == null) { Debug.Log("EntityUnSetting gameobject is null : " + pDelObjBase.GetObjInfo().m_strGameName); return(false); } // puos 20141019 null parent set pGameObject.transform.parent = null; CObjResourcePoolingManager.instance.Despawn(pDelObjBase.GetLinkEntity()); pDelObjBase.SetLinkEntity(null); //Debug.Log("EntityUnSetting pSetObject :" + pDelObjBase.GetObjInfo().m_strGameName); } return(true); }
/// <summary> /// change animation state /// </summary> /// <param name="animParam"></param> protected override void ChangeAnim(AnimStateBase state) { if (m_anim == null) { return; } List <PlayAnimParam> animParam = ((AnimState)state).playAnimParams; string aniTemp = ""; for (int i = 0; i < animParam.Count; i++) { string aniName = ((PlayAnimParam)animParam[i]).aniName; int value = ((PlayAnimParam)animParam[i]).value; PlayAnimParam.Type type = ((PlayAnimParam)animParam[i]).type; if (type == PlayAnimParam.Type.Trigger) { m_anim.SetTrigger(((PlayAnimParam)animParam[i]).paramId); aniTemp += "/" + aniName; continue; } m_anim.SetInteger(((PlayAnimParam)animParam[i]).paramId, value); aniTemp += "/" + aniName + ":" + value; } Debug.Log(gameObject.name + " # Play Anim # " + aniTemp); }
static void ApplyFrameRate(int frameRateType) { switch (frameRateType) { case 0: Application.targetFrameRate = 20; QualitySettings.vSyncCount = CoreApplication.IsMobile ? 0 : 0; break; case 1: Application.targetFrameRate = 30; QualitySettings.vSyncCount = CoreApplication.IsMobile ? 1 : 0; break; case 2: Application.targetFrameRate = 40; QualitySettings.vSyncCount = CoreApplication.IsMobile ? 1 : 0; break; case 3: Application.targetFrameRate = 60; QualitySettings.vSyncCount = CoreApplication.IsMobile ? 1 : 0; break; } Debug.Log("FrameRate:" + Application.targetFrameRate + " IsMobile : " + CoreApplication.IsMobile); }
public bool HandleEscapeKey() { if (uiPopupList.Count > 0) { UiCtrlBase ui = uiPopupList[uiPopupList.Count - 1]; if (ui != null && ui.isActiveAndEnabled) { string uiName = ui.name; bool handled = ui.HandleEscapeKey(); if (handled) { Debug.Log("EscapeKey has handled by PopupUi[" + uiName + "]."); return(handled); } } } if (_currUi != null) { _currUi.OnClickEscapeKey(); return(false); } return(true); }
void _ShowRetryConfirmMsg() { string errorMsg = Translate("EC_NOT_CONNECT_1000") + System.Environment.NewLine + _errorDesc; Debug.Log(errorMsg); // Popup.OneButton _popup = new Popup.OneButton //{ // Title = "UI_Noti", // Message = errorMsg, // FirstBtn_Txt = "UI_Confirm", // }; // [12/17/2018 puos] 게임 종료 버튼 추가 //_popup.Popup(delegate (bool ok) { _errorDesc = null; _continuousNetworkErrorCnt = 0; if (_downloadMaterfileByteArray == null) { _ChangeState(State.DownloadMasterFile); } else { _ChangeState(State.DownloadEachFile); } } //); //PopupManager.Instance.Push(_popup); }
sealed public override void _Init() { Debug.Assert(_uiState < UiState.Inited, @"UiCtrl(" + name + @") has already initialized."); if (!_isCreated) { _Create(); } _ChangeUiState(UiState.Inited); _RelayUiParam(); if (_uiParamBase != null && _uiParamBase.onLoadCompleted != null) { _uiParamBase.onLoadCompleted(this); } OnInit(); // Refresh () is executed when refreshFlag is specified in OnInit (). TryRefresh(); if (!_uiId.IsInvalid()) { Debug.Log("<color=lightblue>Ui Activate :" + _uiId + "</color>"); } }
public void EndChangeMap() { Destroy(); CEffectResourcePoolingManager.instance.Destroy(); Debug.Log("EndChangeMap - EACEffectManager"); }
public void OnSceneLoaded() { _worldCamera = CameraUtil.FindMainCamera(); SoundManager.instance.CreateLowPassFilter(); Debug.Log("EaMainframe - OnSceneLoaded frameCount : " + Time.frameCount); }
protected void SendCloseClick(string btnName) { uiResult.btId = btnName; Close(); Debug.Log("SendCloseClick :" + btnName); }
public void StartChangeMap() { Debug.Log("StartChangeMap - EACObjManager begin frameCount : " + Time.frameCount); Destroy(); Debug.Log("EndChangeMap - EACObjManager end frameCount : " + Time.frameCount); }
public void EndChangeMap() { Debug.Log("EndChangeMap - EACObjManager begin frameCount : " + Time.frameCount); Destroy(); CObjResourcePoolingManager.instance.Destroy(); Debug.Log("EndChangeMap - EACObjManager end"); }
private void StartLoad(string sceneName) { // When testing from a particular scene in the editor, calling GetLoadedSceneName () is correct because _sceneNameToLoad does not carry the name of the first scene when moving the scene. _prevSceneId = GetLoadedSceneName(); _sceneNameToLoad = sceneName; _state = State.CloseCurrScene; Debug.Log("SceneManager.LoadScene() [" + GetPrevSceneName() + "] -> [" + sceneName + "]"); }
public static IEnumerator CtimeScaleZeroPlay(Animation animation, System.Action onComplete) { AnimationState _currState = GetFirstAnimState(animation); bool isPlaying = true; float _progressTime = 0f; float _timeAtLastFrame = 0f; float _timeAtCurrentFrame = 0f; float deltaTime = 0f; animation.Play(); _timeAtLastFrame = Time.realtimeSinceStartup; while (isPlaying) { _timeAtCurrentFrame = Time.realtimeSinceStartup; deltaTime = _timeAtCurrentFrame - _timeAtLastFrame; _timeAtLastFrame = _timeAtCurrentFrame; _progressTime += deltaTime; _currState.normalizedTime = _progressTime / _currState.length; animation.Sample(); //Debug.Log(_progressTime); if (_progressTime >= _currState.length) { //Debug.Log("Bam! Done animating"); if (_currState.wrapMode != WrapMode.Loop) { //Debug.Log("Animation is not a loop anim, kill it."); //_currState.enabled = false; isPlaying = false; } else { //Debug.Log("Loop anim, continue."); _progressTime = 0.0f; } } yield return(new WaitForEndOfFrame()); } yield return(null); if (onComplete != null) { Debug.Log("Complete"); onComplete(); } }
void Init() { EAMainFrame mainframe = FindObjectOfType <EAMainFrame>(); // When the first scene runs, it creates a MainFrame. if (mainframe == null) { EAMainframeUtil.CreateMainFrameTree(); Debug.Log("EA SceneConfig.Init - Call Init() frameCount:" + Time.frameCount); } }
void OnDestroy() { if (onSceneDestroy != null) { onSceneDestroy(); } Debug.Log("EASceneLogic.OnDestroy()"); Debug.Assert(instance != null); instance = null; }
public static string[] LoadTextLineArray(string filePath) { if (!File.Exists(filePath)) { return(null); } string[] s = File.ReadAllLines(filePath); Debug.Log("FileManager - " + filePath + " - read string:" + s); return(s); }
void CreateSceneLogic() { EASceneLogic sm = null; Type t = null; _sceneInfo.TryGetValue(controllerClass, out t); sm = (EASceneLogic)EAFrameUtil.AddChild(EAMainFrame.instance.gameObject, t, "gameLogic") as EASceneLogic; Debug.Log("EA SceneConfig.CreateSceneLogic - call CreateSceneLogic sm is " + ((sm == null) ? "null" : "valid") + " controller class :" + controllerClass + " frameCount:" + Time.frameCount); }
public void OnApplicationQuit() { Debug.Log("MainFrame.OnApplicationQuit()"); isApplicationQuiting = true; if (EASceneLogic.instance != null) { EASceneLogic.instance.Destroy(); } FileLogger.CloseAllFileLoggers(); }
public void DoPostInit() { if (_sceneLoadingState == SceneLoadingState.PostInited) { return; } Debug.Log("EASceneLogic.DoPostInit() frameCount:" + Time.frameCount); OnPostInit(); _sceneLoadingState = SceneLoadingState.PostInited; }
/*protected virtual */ private void OnDisable() { if (_uiState >= UiState.Inited && _uiState < UiState.WillDestroy) { OnDisableUI(); _onUiEnabled(this, false); if (!_uiId.IsInvalid()) { Debug.Log("<color=lightblue>Ui deActivate :" + _uiId + "</color>"); } } }
void _ChangeState(State newState) { if (_state == newState) { Debug.Log("same State:" + newState); return; } Debug.Log("Change State:" + newState); // DownloadFiles만 같은 State로 전환가능. 나머진 불가. if (_state != State.DownloadEachFile && _state == newState) { Debug.Assert(false, "Invalid State Transition: " + _state + "-->" + newState); return; } _state = newState; switch (_state) { case State.DownloadMasterFile: _StartDownloadMasterFile(); break; case State.CalcDownloadList: StartCoroutine(_BuildDownloadList()); break; case State.ShowConfirmMsg: _ShowDownloadConfirmMsg(); break; case State.DownloadEachFile: _StartDownloadBundleFile(); break; case State.End: OnComplete(_errorDesc); break; case State.ConfirmRetry: _ShowRetryConfirmMsg(); break; case State.WaitRetry: Debug.Log("WaitRetry. ContinuousNetworkErrorCnt:" + _continuousNetworkErrorCnt); _retryWaitTimer = 1; break; } }
public static int GetOsVersion() { string osVersion = SystemInfo.operatingSystem; Debug.Log("SystemInfo.operatingSystem:" + osVersion); if (CoreApplication.IsMobileIPhone == true) { osVersion = osVersion.Replace("iPhone OS ", ""); return(Mathf.FloorToInt(float.Parse(osVersion.Substring(0, 1)))); } return(0); }
/*protected virtual */ private void OnEnable() { if (_uiState > UiState.None && _uiState < UiState.WillDestroy) { OnEnableUI(); _onUiEnabled(this, true); if (!_uiId.IsInvalid()) { Debug.Log("<color=yellow>Ui Activate :" + _uiId + "</color>"); } } }
void PlayOnce() { if (audioClip.Count > playMin) { Debug.Log("playSound sfx index : " + playMin); if (audioClip[playMin] != null) { if (SoundManager.instance != null) { SoundManager.instance.PlayOneShot(audioClip[playMin], volume, SOUND_TYPE.SFX); } } } }
/// <summary> /// Transition FSM /// </summary> /// <typeparam name="T"></typeparam> /// <param name="nState"></param> public void TransitionFSMCommand <T>(T nState) { Type typeParameterType = typeof(T); if (typeParameterType.IsEnum == false) { Debug.Log("invalid type - type is not null"); return; } T current_state = (T)Enum.ToObject(typeParameterType, nState); uint idx = System.Convert.ToUInt32(current_state); TransitionCommand(idx); }
public void Init() { _sceneLoadingState = SceneLoadingState.Inited; sceneName = SceneLoadingManager.instance.GetLoadedSceneName(); if (EAMainFrame.instance != null) { EAMainFrame.instance.OnSceneLoaded(); } Debug.Log("EASceneLogic.Init() frameCount:" + Time.frameCount); OnInit(); }
// player pref save public void SaveToDisc() { foreach (var keyPair in optionValues) { PlayerPrefs.SetInt(keyPair.Value.key, keyPair.Value.GetValue()); } foreach (var keyPair in optionValues_string) { PlayerPrefs.SetString(keyPair.Value.key, keyPair.Value.GetValue_String()); } PlayerPrefs.Save(); Debug.Log("OptionManager - saveToDisc"); }