public void LogPath(Vector2[] path) { if (!PathCheck(path)) { canMove = false; return; } canMove = true; int count = path.Length; log.LogMovePosition(path); }
void ImportPlayerCombatData(PlayerCombatData playerCD) { //Import Movement Data combatHUDLog.RemoveAllMovement(); foreach (PlayerCombatMovementData playerCMD in playerCD.pcmd) { List <Vector3> des = new List <Vector3>(); foreach (PlayerCombatMovementDestination vec in playerCMD.destination) { des.Add(new Vector3(vec.posX, vec.posY, 0)); } combatHUDLog.LogMovePosition(des, playerCMD.hash); } if (combatHUDLog.loggedMoves.Count == 0) { GameManagerScript.ins.playerInfo.polyNav.Stop(); } //Import Attack Data combatHUDAttack.RemoveAllAttacks(); GameManagerScript.ins.playerInfo.CancelAllSpells(); foreach (PlayerCombatAttackData playerCAD in playerCD.pcad) { CombatHUDAttack.Attack a = new CombatHUDAttack.Attack(); a.selectedSpell = SpellManagerScript.ins.GetSpellFromID(playerCAD.selectedSpellID); a.selfCast = playerCAD.selfCast; a.isCasting = playerCAD.isCasting; a.fireMode = playerCAD.fm; a.attackPoint = new Vector3(playerCAD.attackPointPosX, playerCAD.attackPointPosY, 0); a.attackDirection = new Vector3(playerCAD.attackDirectionX, playerCAD.attackDirectionY, 0); a.attackPointModePoint = new Vector3(playerCAD.attackPointModePosX, playerCAD.attackPointModePosY, 0); a.hash = playerCAD.hash; a.attackTarget = NPCManagerScript.ins.GetNPCInSceneFromID(playerCAD.attackTarget); combatHUDAttack.LoadAttackToLayout(a); } combatHUDAttack.DrawAttackPositions(); combatHUDAttack.SortAttackLayout(); //Import Order Data combatSpeech.RemoveAllOrders(); foreach (PlayerCombatOrderData playerCOD in playerCD.pcod) { combatSpeech.ImportOrderData(playerCOD.npcID, playerCOD.o, new Vector3(playerCOD.standAreaPosX, playerCOD.standAreaPosY, 0), new Vector3(playerCOD.watchAreaPosX, playerCOD.watchAreaPosY, 0)); } //Import Progress Data combatHUDAttack.memory.Clear(); GameManagerScript.ins.playerInfo.progress = playerCD.pcqd.spellProgress; GameManagerScript.ins.playerInfo.wasLoaded = true; if (GameManagerScript.ins.playerInfo.spellQueue.Count > 0) { GameManagerScript.ins.playerInfo.spellQueue[0].loggedInfo.GetComponentInChildren <Image>().fillAmount = playerCD.pcqd.spellProgress / (GameManagerScript.ins.playerInfo.spellQueue[0].selectedSpell.castTime * 100); } combatSpeech.progress = playerCD.pcqd.orderProgress; combatSpeech.wasLoaded = true; foreach (MemoryData md in playerCD.pcqd.memoryData) { combatHUDAttack.memory.Add(NPCManagerScript.ins.GetNPCInSceneFromID(md.npcID), new Vector3(md.posX, md.posY)); } }