//================================= //#if UNITY_EDITOR void Awake() { if (instance != null && instance != this) { Destroy(instance); } instance = this; // for(int i = 0; i < Player.SUMMON_SLOT_NUM) // { // debugUnitId[i] = debugUnitId[i] + "_0"; // pvpDebugUnitId[i] = pvpDebugUnitId[i] + "_0"; // } // // for(int i = 0; i < Player.SKILL_SLOT_NUM) // { // debugSkillId[i] = debugSkillId[i] + "_0"; // pvpDebugSkillId[i] = pvpDebugSkillId[i] + "_0"; // } #if UNITY_EDITOR if (runInBackground) { Application.runInBackground = runInBackground; } if (useDebug) { parseInitData(); } #else useDebug = false; ignoreCoolTime = false; #endif #if UNITY_EDITOR Player.SUMMON_DELAY = pvpSummonAIUpdateDelay; #endif useTestRound = false; }
public void CheckRoot() { #if UNITY_ANDROID if (isRoot == false) { for (checkRoot_i = 0; checkRoot_i < checkurls.Count; checkRoot_i++) { try{ if (System.IO.Directory.Exists(checkurls[checkRoot_i])) { isRoot = true; //UISystemPopup.OpenPopup("",TextDatas.POPUP_SYSTEM_ROOTUSER,UISystemPopup.TYPE_OK); return; } }catch { Debug.LogError("ERROR CHECK [DTRP]"); } } } #endif }
public void SetCheater() { _isCheater = true; }
public void wakeUp() { waitEnemy = false; waitLine = 0.0f; }
public virtual bool damage(TYPE shooterType, Monster shooter, int checkUnituqeId, bool isSkillType, IFloat damageValue, bool useHitEffect = true, string effectId = "E_HIT_STRIKE", string soundId = null) { if (_isEnabled == false) { return(false); } if (waitEnemy) { GameManager.me.characterManager.wakeUpMonster(cTransformPosition); waitEnemy = false; } playDamageSoundAndEffect((shooter != null)?shooter.stat.uniqueId:-1000, useHitEffect, soundId, effectId); //if(damageValue < 1 || _invincibleTime > 0.0f ) return false; if (damageValue < 1) { return(false); } if (GameManager.me.isPlaying == false && UIPopupSkillPreview.isOpen == false) { return(false); } if (invincible.Get() == false) { // 회피 확률. if (canAvoid()) { return(false); // shooterType != TYPE.UNIT } checkDamageReflection(damageValue, shooter, checkUnituqeId); if (checkDamageTanker(damageValue)) { return(false); } hp -= damageValue; hpEffect(-damageValue); if (_hp <= 0) { dead(); return(true); } else { if (isSkillType == false) { addDamageCharacter(shooter, checkUnituqeId); } if (damageValue > 0 && _damageMotionDuration > 100.0f) { damageMotionEffect(tf); } } setDamageFrame(); return(true); } return(false); }
public void setNowRound(RoundData rd, GameType.Mode gameType = GameType.Mode.Epic, int inputAct = 1, int inputStage = 1, int inputRound = 1) { // Debug.LogError("**** StageManager setNowRound"); sigongData = null; playAct = inputAct; playStage = inputStage; playRound = inputRound; DebugManager.instance.useTagMatchMode = (gameType == GameType.Mode.Friendly || gameType == GameType.Mode.Championship); #if UNITY_EDITOR if (DebugManager.instance.useDebug) { DebugManager.instance.useTagMatchMode = (rd.mode == RoundData.MODE.PVP); } #endif isMaxRound = (inputAct == GameDataManager.instance.maxAct && inputStage == GameDataManager.instance.maxStage && inputRound == GameDataManager.instance.maxRound); isRepeatGame = (GameDataManager.instance.roundClearStatusCheck(playAct, playStage, playRound)); isSurrenderGame = false; // 라운드 게임 정보를 입력. isIntro = (rd.id == "INTRO"); nowRound = rd; mapStartPosX = rd.mapStartEndPosX[0]; mapEndPosX = rd.mapStartEndPosX[1]; mapPlayerEndPosX = mapEndPosX - 100; if (rd.mode == RoundData.MODE.HELL) { HellModeManager.instance.setStage(rd); } else { HellModeManager.instance.setStage(null); } isPVPMode = false; nowPlayingGameType = gameType; switch (rd.mode) { case RoundData.MODE.PVP: clearChecker = checkGameClearPVP; failChecker = checkGameFailPVP; isPVPMode = true; break; case RoundData.MODE.KILLEMALL: clearChecker = checkGameClearKillemAll; failChecker = checkGameFailKillemAll; break; case RoundData.MODE.SURVIVAL: clearChecker = checkGameClearSurvival; failChecker = checkGameFailSurvival; break; case RoundData.MODE.PROTECT: clearChecker = checkGameClearProtect; failChecker = checkGameFailProtect; break; case RoundData.MODE.SNIPING: clearChecker = checkGameClearSniping; failChecker = checkGameFailSniping; break; case RoundData.MODE.KILLCOUNT: clearChecker = checkGameClearKillCount; failChecker = checkGameFailKillCount; break; case RoundData.MODE.KILLCOUNT2: clearChecker = checkGameClearKillCount2; failChecker = checkGameFailKillCount; break; case RoundData.MODE.ARRIVE: clearChecker = checkGameClearArrive; failChecker = checkGameFailArrive; _prevDist = 99999; break; case RoundData.MODE.DESTROY: clearChecker = checkGameClearDestroy; failChecker = checkGameFailDestroy; break; case RoundData.MODE.GETITEM: clearChecker = checkGameClearGetItem; failChecker = checkGameFailGetItem; break; case RoundData.MODE.B_TEST: clearChecker = checkGameClearBtest; failChecker = checkGameFailKillemAll; break; case RoundData.MODE.HELL: clearChecker = checkGameClearHell; failChecker = checkGameFailHell; nowPlayingGameType = GameType.Mode.Hell; break; default: clearChecker = checkGameClear; failChecker = checkGameFail; break; } #if UNITY_EDITOR if (DebugManager.instance.useDebug) { if (UnitSkillCamMaker.instance.useUnitSkillCamMaker) { clearChecker = GameManager.me.stageManager.dontCheck; failChecker = GameManager.me.stageManager.dontCheck; return; } } #endif }
bool gameEndCheck() { if (needClearWork) { int _cs = _currentScene; switch (_cs) { case Scene.STATE.PLAY_CLEAR_SUCCESS: if (uiManager.uiLoading.gameObject.activeSelf) { uiManager.uiPlay.resetCamera(); uiManager.uiLoading.hide(); } needClearWork = false; #if UNITY_EDITOR if (BattleSimulator.nowSimulation) { ++BattleSimulator.instance.win; BattleSimulator.instance.endSimulation(); _currentScene = Scene.STATE.TITLE; return(true); } #endif if (HellModeManager.instance.isOpen) { player.changeShader(false, true); player.setColor(new Color(1, 1, 1, 1)); // 다음 라운드를 진행 할 수 있다면 계속 진행한다. if (HellModeManager.instance.checkNextRound()) { uiManager.uiPlay.showHellRoundSuccessAnimation(); } // 진행할 수 없다면 끝! (25 웨이브가 끝이다.) else { player.clearPlayerEffect(); player.changeShader(false, true); player.setColor(new Color(1, 1, 1, 1)); if (GameManager.replayManager.isPVPReplayIsSurrenderGame == false && recordMode != RecordMode.replay) { //cutSceneManager.startUnitSkillCamScene("WIN", player.cTransform.position, UIPlay.SKILL_EFFECT_CAM_TYPE.ChaserAttack); player.state = Monster.WIN; player.playAni(Monster.WIN); player.renderAniRightNow(); } onCompleteRound(WSDefine.GAME_SUCCESS); } return(true); } // 클리어 컷씬 발동 체크. cutSceneManager.roundStateCheck(true); player.clearPlayerEffect(); player.changeShader(false, true); player.setColor(new Color(1, 1, 1, 1)); if (pvpPlayer != null) { pvpPlayer.clearPlayerEffect(); } // 컷씬이 발동됐으면 그냥 백단에서 패킷을 임시로 보낸다. // 아니면 success 처리를 한다... if (CutSceneManager.nowOpenCutScene == false) { if (GameManager.replayManager.isPVPReplayIsSurrenderGame == false && recordMode != RecordMode.replay) { cutSceneManager.startUnitSkillCamScene("WIN", player.cTransform.position, UIPlay.SKILL_EFFECT_CAM_TYPE.ChaserAttack, -1); GameManager.me.gameCamera.nearClipPlane = 1000.0f; //1200.0f; // player.state = Monster.WIN; player.playAni(Monster.WIN); player.renderAniRightNow(); } onCompleteRound(WSDefine.GAME_SUCCESS); } else { onCompleteRound(WSDefine.GAME_SUCCESS); } return(true); break; case Scene.STATE.PLAY_CLEAR_FAILED: if (uiManager.uiLoading.gameObject.activeSelf) { uiManager.uiPlay.resetCamera(); uiManager.uiLoading.hide(); } needClearWork = false; #if UNITY_EDITOR if (BattleSimulator.nowSimulation) { ++BattleSimulator.instance.lose; //BattleSimulator.log("#GAME: " + BattleSimulator.instance.nowGameNum + " 패배. 시간: ",stageManager.playTime + " player hp:" + player.hp, "sp:" + player.sp, "mp:"+player.mp + " | pvp hp:" + pvpPlayer.hp, "sp:" + pvpPlayer.sp, "mp:"+pvpPlayer.mp); isInit = false; isPlaying = false; BattleSimulator.instance.endSimulation(); _currentScene = Scene.STATE.TITLE; return(true); } #endif // 실패할때 컷씬 시작 체크. 그런건 이제 없음. cutSceneManager.roundStateCheck(); player.clearPlayerEffect(); if (pvpPlayer != null) { pvpPlayer.clearPlayerEffect(); } if (CutSceneManager.nowOpenCutScene == false) { startGameOver(); return(true); } else { onCompleteRound(WSDefine.GAME_FAILED); } return(true); break; case Scene.STATE.PLAY_CLEAR_DRAW: needClearWork = false; #if UNITY_EDITOR if (BattleSimulator.nowSimulation) { ++BattleSimulator.instance.draw; isInit = false; isPlaying = false; BattleSimulator.instance.endSimulation(); _currentScene = Scene.STATE.TITLE; } #endif return(true); break; } } return(false); }