// Start is called before the first frame update void Start() { playerParty = FindObjectOfType <PlayerParty>(); //needed this when using Screen Space Overlay for the Canvas. Apparently changing the perspective to screen space Camera changed the ui elements position to correspond with local coordinates. /* * /*firstSpawnPoint = Camera.main.ScreenToWorldPoint(spawnPoint[0].transform.position + YPosOffset); * firstSpawnPoint.z = 0; * secondSpawnPoint = Camera.main.ScreenToWorldPoint(spawnPoint[1].transform.position + YPosOffset); * secondSpawnPoint.z = 0; * thirdSpawnPoint = Camera.main.ScreenToWorldPoint(spawnPoint[2].transform.position + YPosOffset); * thirdSpawnPoint.z = 0; */ SpawnPlayerOneInPlayerParty(); SpawnPlayerTwoInPlayerParty(); SpawnPlayerThreeInPlayerParty(); }
public void Start() { EnemyParty.SpawnPartyMembers(); PlayerParty.SpawnPartyMembers(); // Find all the combatants and set them to be children of the Combat Manager. GameObject[] children = GameObject.FindGameObjectsWithTag("CombatantTag"); foreach (GameObject child in children) { child.transform.SetParent(transform); } panel = GameObject.FindObjectOfType <GUIPanel>(); rng = new System.Random(); combatants = GetComponentsInChildren <CombatController>().ToList(); combatants.Sort(new SortCombatantDescendant()); OnSetUpPlayers.Invoke(combatants); }
private void AbilityExecuted() { AbilitySelectedRoot.gameObject.SetActive(false); if (GameOverCheck()) { return; } EndTurnButton.interactable = !IsEnemyTurn; foreach (var a in Abilities) { a.Disable = false; } ToIdleState(); if (IsEnemyTurn) { EnemyAIAct(); } else { if (!SelectedActor.CanAct) { SetSelection(PlayerParty.FirstOrDefault(s => s.CanAct)); } if (PlayerParty.Where(p => p.PlayerControllable).All(p => !p.CanAct)) { PlayerAIAct(); } else { if (AutoEndTurn && !PlayerParty.Any(p => p.CanAct)) { EndTurn(); } } } }
private void GenerateGameRounds(ref GameAccountability game, PlayerParty winner, PlayerParty looser) { var rand = new Random(); game.Rounds = new List <Round>(); for (int i = 0; i < _gamingRounds; i++) { var round = new Round(); round.PlayerOneSerie = new Serie { Score = new Measurement { Quantity = new Quantity { Unit = _scoreUnit, Number = rand.Next(2, 201) }, PhenomenonType = _phenomenonType } }; round.PlayerTwoSerie = new Serie { Score = new Measurement { Quantity = new Quantity { Unit = _scoreUnit, Number = rand.Next(1, round.PlayerOneSerie.Score.Quantity.Number) }, PhenomenonType = _phenomenonType } }; game.Rounds.Add(round); _accountabilityContext.StoreGameRound(round); LogRoundScore(winner, round.PlayerOneSerie.Score); LogRoundScore(looser, round.PlayerTwoSerie.Score); } }
public PlayerParty Create(string name, string legalId) { var party = new PlayerParty { Name = name, LegalId = legalId, ScoreAccount = new RoundsScoreAccount() { Entries = new List <RoundsScoreEntry>() }, WinningAccount = new WinningAccount() { Entries = new List <WinningEntry>() } }; _parties.Add(party); return(party); }
void WarRoomSet() { if (roomIndex == -1) { return; } PlayerParty tempParty = PlayerManager.instance.GetPlayerParty; roomCharacter = tempParty.GetPartyMember(roomIndex); if (roomCharacter == null) { Debug.Log("UI__WAR__FRIENDLY BATTLE CHARACTER NULL____"); return; } int index = roomCharacter.Index; partyFriendlyImage.sprite = DataSet.CharacterImageResources[index]; }
// Use this for initialization void Start() { // Populate Tile Grid. manager.tileGrid = new Tile[Constants.COMBAT_WIDTH, Constants.COMBAT_HEIGHT]; for (int x = 0; x < Constants.COMBAT_WIDTH; x++) { for (int y = 0; y < Constants.COMBAT_HEIGHT; y++) { GameObject newTile = Instantiate(tilePrefab, new Vector3(x + y, x * 0.75f - y * 0.75f, 0), Quaternion.identity); SpriteRenderer rend = newTile.GetComponent <SpriteRenderer>(); rend.sortingOrder = y - x; Tile t = newTile.GetComponent <Tile>(); manager.tileGrid[x, y] = t; t.x = x; t.y = y; } } EnemyParty.SpawnPartyMembers(); PlayerParty.SpawnPartyMembers(); manager.combatants.Sort(new SortCombatants()); }
public void PartyCreate() { PlayerParty temp = PlayerManager.instance.GetPlayerParty; Transform Chlid; FriendActor Actor; for (int i = 0; i < temp.PartyCount(); ++i) { if (temp.GetPartyMember(i) != null) { Chlid = Craete(temp.GetPos(i), PlayerManager.instance.GetPartyParent().transform, FriendCreate(temp.GetPartyMember(i).Index)).transform.GetChild(0); Actor = Chlid.GetComponent <FriendActor>(); temp.SetActor(i, Actor); Actor.SetParty(PlayerManager.instance.GetPlayerParty); Actor.RegistCharacter(temp.GetPartyMember(i)); Actor.SetFormationPos((PartyPos)i); Chlid.localPosition = new Vector3(0, 0, -0.3f); Chlid.localRotation = Quaternion.Euler(90f, 0, 0); } } }
void Start() { //* //TODO deleta isso if (playerParty == null) { playerParty = tempGambPrefab; } if (enemyParty == null) { enemyParty = tempGambPrefab2; } if (previousScene == null) { previousScene = "overworld"; } //*/ livePlayerParty = Instantiate(playerParty).GetComponent <PlayerParty>(); liveEnemyParty = Instantiate(enemyParty).GetComponent <EnemyParty>(); StartCoroutine(BattleCycle()); }
private void ActorSelected(Actor selection) { if (State == BattleGameStateType.PartyIdle) { if (PlayerParty.Contains(selection)) { SetSelection(selection); } } else if (State == BattleGameStateType.AbilitySelected) { if (SelectedAbility.IsValidTarget(selection)) { ExecuteAbility(SelectedAbility, selection); } else if (PlayerParty.Contains(selection)) { ToIdleState(); SetSelection(selection); } } }
public void DataInit() { UIPartyInit(); PlayerParty tempParty = PlayerManager.instance.GetPlayerParty; List <int> tempBatlleNumber = new List <int>(); int activeCount = 0; int partyCount = tempParty.PartyCount(); for (int i = 0; i < partyCount; ++i) { if (tempParty.GetActors()[i] != null) { ++activeCount; tempBatlleNumber.Add(i); } } if (activeCount != 0) { for (int i = activeCount; i < partyMembers.Length; ++i) { partyMembers[i].gameObject.SetActive(false); } } Vector2[] tempConvert = PartyMemberConvert(activeCount); for (int i = 0; i < activeCount; ++i) { partyMembers[i].gameObject.SetActive(true); partyMembers[i].GetRectField().localPosition = tempConvert[i]; partyMembers[i].SetBatlleData(tempBatlleNumber[i]); partyMembers[i].AddEvent(); } tempBatlleNumber.Clear(); }
public PlayerParty WinnerOfYear(int year) { PlayerParty leader = null; var yearStart = new DateTime(year, 1, 1); var nextYearStart = new DateTime(year + 1, 1, 1); var games = _accountabilityContext.AllGames().Where( x => x.TimePoint >= yearStart && x.TimePoint < nextYearStart); foreach (var party in _partyContext.All()) { if (leader == null || games.Count(x => x.Winner == party) > games.Count(x => x.Winner == leader) ) { leader = party; } } return(leader); }
private bool GameOverCheck() { if (!PlayerParty.First(p => p.Class == ClassType.Egg).IsAlive) { State = BattleGameStateType.GameOver; StartCoroutine(GameOverCrt()); return(true); } if (EnemyParty.All(p => !p.IsAlive)) { if (!VictoryScreen.gameObject.activeInHierarchy) { State = BattleGameStateType.GameOver; StartCoroutine(GameOverCrt()); return(true); } } return(false); }
public void Init(List <Actor> playerParty, List <Actor> enemyPartyDef) { SelectedActor = null; SelectedAbility = null; IsEnemyTurn = false; VictoryScreen.gameObject.SetActive(false); GameOverScreen.gameObject.SetActive(false); PlayerParty.Clear(); int i = 0; foreach (var p in playerParty) { if (p.IsAlive) { p.transform.localPosition = new Vector3(i / 3 * -3.25f, -(i - 1) * 2.75f, 0); if (i == 3) { var v = p.transform.localPosition; v.y = 0; p.transform.localPosition = v; } p.transform.SetParent(PlayerRoot.transform, worldPositionStays: false); p.gameObject.SetActive(true); p.Init(); PlayerParty.Add(p); } ++i; } foreach (var e in EnemyParty) { Destroy(e.gameObject); } EnemyParty.Clear(); i = 0; foreach (var def in enemyPartyDef) { int onColumns = enemyPartyDef.Count - (i / 3) * 3; if (onColumns > 3) { onColumns = 3; } float y = 0; float off = 2.75f; if (onColumns == 1) { y = 2.75f; } else if (onColumns == 2) { y = 3.5f / 2.0f; off = 3.5f; } var p = Instantiate(def, EnemeyRoot.transform); p.MaxHealth = (def.MaxHealth * (100 + GameController.Instance.GameDifficulty.EnemiesHealthModifier)) / 100; p.transform.localPosition = new Vector3(i / 3 * 3f - 0.5f, (i % 3 - 1) * off + y, 0); p.SetToMaxHP(); p.gameObject.SetActive(true); p.Init(); EnemyParty.Add(p); ++i; } SetSelection(PlayerParty.FirstOrDefault()); foreach (var p in PlayerParty) { p.NewTurn(); } ToIdleState(); }
private void Update() { ScrapText.text = $"SCRAP: {GameController.Instance.Scrap}"; if (VictoryScreen.gameObject.activeInHierarchy) { return; } var mousePos = _camera.ScreenToWorldPoint(Input.mousePosition); var hit = Physics2D.Raycast(mousePos, Vector2.zero); if (State == BattleGameStateType.PartyIdle || State == BattleGameStateType.AbilitySelected) { if (SelectedActor != null) { for (int i = 0; i < _abilityKeys.Length; ++i) { if (Input.GetKeyUp(_abilityKeys[i])) { if (Abilities.Count > i && Abilities[i].enabled && Abilities[i].Ability.CanExecute(Actors)) { AbilityClicked(Abilities[i]); break; } } } } if (Input.GetKeyUp(KeyCode.E)) { EndTurn(); } if (Input.GetKeyUp(KeyCode.Tab)) { var alive = PlayerParty.Where(t => t.IsAlive).ToList(); int i = alive.IndexOf(SelectedActor); ++i; if (i >= alive.Count) { i = 0; } ToIdleState(); SetSelection(alive[i]); } } if (Input.GetMouseButtonUp(0)) { Actor selection = null; if (hit.collider != null) { selection = hit.collider.gameObject.GetComponent <Actor>(); } if (selection != null) { ActorSelected(selection); } } if (Input.GetMouseButtonUp(1) || Input.GetKeyUp(KeyCode.Escape)) { if (State == BattleGameStateType.AbilitySelected) { ToIdleState(); } } if (hit.collider != null) { var buff = hit.collider.GetComponent <UIBuff>(); if (buff != null) { GameController.Instance.Tooltip.ShowBuff(buff.Buff, buff.Stack); } else if (GameController.Instance.Tooltip.Object is Buff) { GameController.Instance.Tooltip.Hide(); } } else if (GameController.Instance.Tooltip.Object is Buff) { GameController.Instance.Tooltip.Hide(); } }
public void NewGame() { PlayerParty.Reset(); EnemyParty.Reset(); SceneManager.LoadScene(Constants.SCENE_TOWN_MENU); }
void Awake() { transition = GameObject.FindGameObjectWithTag("Transition").GetComponent <Transition>(); player = playerGO.GetComponent <PlayerParty>(); }
private void Start() { PlayerInput = PlayerNetworkClone.GetComponent <PlayerParty>(); PlayerName = PlayerInput.PlayerName; }
public int SummaryWinningAccount(PlayerParty player) { return(player.WinningAccount.Entries.Sum(x => x.Amount)); }
private static void _Create() { instance = new GameObject("PlayerParty").AddComponent <PlayerParty>(); instance.playerEntity = Resources.Load <GameObject>("PlayerEntity"); }
void Awake() { playerParty = GameObject.FindGameObjectWithTag("Player").GetComponent <PlayerParty>(); }
public void Initialize() { Party = new PlayerParty(this); Party.Initialize(); TimedAction = new PlayerTimedAction(this); _vignette = Camera.main.GetComponent<VignetteAndChromaticAberration>(); IsHoldToAim = true; _numberOfRocks = 10; InputEventHandler.OnCameraSwitchMode += SwitchCameraMode; InputEventHandler.OnPlayerMove += this.OnPlayerMove; InputEventHandler.OnPlayerStopMove += this.OnPlayerStopMove; InputEventHandler.OnWeaponPullTrigger += this.OnWeaponPullTrigger; InputEventHandler.OnWeaponReleaseTrigger += this.OnWeaponReleaseTrigger; InputEventHandler.OnRMBDown += this.OnRMBDown; InputEventHandler.OnRMBUp += this.OnRMBUp; InputEventHandler.OnLRMBDown += this.OnLRMBDown; InputEventHandler.OnKick += this.OnKick; InputEventHandler.OnPlayerMoveLeft += this.OnPlayerMoveLeft; InputEventHandler.OnPlayerMoveRight += this.OnPlayerMoveRight; InputEventHandler.OnPlayerMoveUp += this.OnPlayerMoveUp; InputEventHandler.OnPlayerMoveDown += this.OnPlayerMoveDown; InputEventHandler.OnPlayerStopMoveLeft += this.OnPlayerStopMoveLeft; InputEventHandler.OnPlayerStopMoveRight += this.OnPlayerStopMoveRight; InputEventHandler.OnPlayerStopMoveUp += this.OnPlayerStopMoveUp; InputEventHandler.OnPlayerStopMoveDown += this.OnPlayerStopMoveDown; InputEventHandler.OnPlayerStartSprint += this.OnPlayerStartSprint; InputEventHandler.OnPlayerStopSprint += this.OnPlayerStopSprint; InputEventHandler.OnPlayerToggleSneak += OnToggleSneaking; InputEventHandler.OnPlayerThrow += OnThrow; InputEventHandler.OnPlayerSwitchWeapon2 += OnToggleWeapon2; InputEventHandler.OnPlayerSwitchWeapon1 += OnToggleWeapon1; InputEventHandler.OnPlayerSwitchThrown += OnToggleThrown; InputEventHandler.OnPlayerSwitchTool += OnToggleTool; InputEventHandler.OnPlayerReload += OnWeaponReload; InputEventHandler.OnToggleFlashlight += OnToggleFlashlight; InputEventHandler.OnGameTogglePause += ToggleGamePause; InputEventHandler.OnSelectMember1 += OnSelectMember1; InputEventHandler.OnSelectMember2 += OnSelectMember2; InputEventHandler.OnSelectMember3 += OnSelectMember3; InputEventHandler.OnSelectMember4 += OnSelectMember4; InputEventHandler.OnMouseSelect += OnPlayerMouseSelect; InputEventHandler.OnClearTask += OnClearTask; _moveDirection = PlayerMoveDirEnum.Stop; _moveDirection2 = PlayerMoveDirEnum.Stop; SelectedPC.CurrentStance = HumanStances.Run; _playerLight = GameObject.Find("PlayerLight").GetComponent<Light>(); _playerLight.intensity = 0.1f; }
public void ReturnToTown() { PlayerParty.ResetPowerUpTexts(); SceneManager.LoadScene(Constants.SCENE_TOWN_MENU); }
public void LoadTownData() { if (Application.loadedLevel == 1) { //currencies loaded currencyManager = GetComponent <CurrencyManager>(); currencyUI = FindObjectOfType <CurrencyUI>(); currencyManager.Gold.Value = data.goldValue; currencyManager.Scrap.Value = data.scrapValue; currencyManager.Food.Value = data.foodValue; data.playerParty = FindObjectOfType <PlayerParty>(); playerParty = FindObjectOfType <PlayerParty>(); //loads item/ inventory info foreach (string id in data.ids) { ids.Add(id); } foreach (EEquipmentType type in data.itemTypes) { equipmentType.Add(type); } characterManager = FindObjectOfType <CharacterManager>(); //character 0 characterManager.allCharacters[0].Name = data.characterName0; characterManager.allCharacters[0].Level = data.characterLevel0; characterManager.allCharacters[0].MaxHealth = data.characterHealth0; characterManager.allCharacters[0].Strength = data.characterStrength0; characterManager.allCharacters[0].Dexterity = data.characterDexterity0; characterManager.allCharacters[0].Intelect = data.characterIntellect0; characterManager.allCharacters[0].Experience = data.characterExperience0; characterManager.allCharacters[0].EquipmentCapacity = data.characterEquipCap0; characterManager.allCharacters[0].CharacterType = data.characterType0; characterManager.allCharacters[0].isUnlocked = data.characterUnlocked0; characterManager.allCharacters[0].IsPartyMember = data.characterInParty0; if (characterManager.allCharacters[0].IsPartyMember == true) { characterManager.allCharacters[0].PartyPosition = data.character0PartyPosition; if (characterManager.allCharacters[0].PartyPosition >= 0 && characterManager.allCharacters[0].PartyPosition < 3) { playerParty.AddPartyMember(characterManager.allCharacters[0].PartyPosition + 1, characterManager.allCharacters[0].Name); } } else { characterManager.allCharacters[0].PartyPosition = -1; } //character 1 characterManager.allCharacters[1].Name = data.characterName1; characterManager.allCharacters[1].Level = data.characterLevel1; characterManager.allCharacters[1].MaxHealth = data.characterHealth1; characterManager.allCharacters[1].Strength = data.characterStrength1; characterManager.allCharacters[1].Dexterity = data.characterDexterity1; characterManager.allCharacters[1].Intelect = data.characterIntellect1; characterManager.allCharacters[1].Experience = data.characterExperience1; characterManager.allCharacters[1].EquipmentCapacity = data.characterEquipCap1; characterManager.allCharacters[1].CharacterType = data.characterType1; characterManager.allCharacters[1].isUnlocked = data.characterUnlocked1; characterManager.allCharacters[1].IsPartyMember = data.characterInParty1; if (characterManager.allCharacters[1].IsPartyMember == true) { characterManager.allCharacters[1].PartyPosition = data.character1PartyPosition; if (characterManager.allCharacters[1].PartyPosition >= 0 && characterManager.allCharacters[1].PartyPosition < 4) { playerParty.AddPartyMember(characterManager.allCharacters[1].PartyPosition + 1, characterManager.allCharacters[1].Name); } } else { characterManager.allCharacters[1].PartyPosition = -1; } //character 2 characterManager.allCharacters[2].Name = data.characterName2; characterManager.allCharacters[2].Level = data.characterLevel2; characterManager.allCharacters[2].MaxHealth = data.characterHealth2; characterManager.allCharacters[2].Strength = data.characterStrength2; characterManager.allCharacters[2].Dexterity = data.characterDexterity2; characterManager.allCharacters[2].Intelect = data.characterIntellect2; characterManager.allCharacters[2].Experience = data.characterExperience2; characterManager.allCharacters[2].EquipmentCapacity = data.characterEquipCap2; characterManager.allCharacters[2].CharacterType = data.characterType2; characterManager.allCharacters[2].isUnlocked = data.characterUnlocked2; characterManager.allCharacters[2].IsPartyMember = data.characterInParty2; if (characterManager.allCharacters[2].IsPartyMember == true) { characterManager.allCharacters[2].PartyPosition = data.character2PartyPosition; if (characterManager.allCharacters[2].PartyPosition >= 0 && characterManager.allCharacters[2].PartyPosition < 3) { playerParty.AddPartyMember(characterManager.allCharacters[2].PartyPosition + 1, characterManager.allCharacters[2].Name); } } else { characterManager.allCharacters[2].PartyPosition = -1; } //character 3 characterManager.allCharacters[3].Name = data.characterName3; characterManager.allCharacters[3].Level = data.characterLevel3; characterManager.allCharacters[3].MaxHealth = data.characterHealth3; characterManager.allCharacters[3].Strength = data.characterStrength3; characterManager.allCharacters[3].Dexterity = data.characterDexterity3; characterManager.allCharacters[3].Intelect = data.characterIntellect3; characterManager.allCharacters[3].Experience = data.characterExperience3; characterManager.allCharacters[3].EquipmentCapacity = data.characterEquipCap3; characterManager.allCharacters[3].CharacterType = data.characterType3; characterManager.allCharacters[3].isUnlocked = data.characterUnlocked3; characterManager.allCharacters[3].IsPartyMember = data.characterInParty3; if (characterManager.allCharacters[3].IsPartyMember == true) { characterManager.allCharacters[3].PartyPosition = data.character3PartyPosition; if (characterManager.allCharacters[3].PartyPosition >= 0 && characterManager.allCharacters[3].PartyPosition < 3) { playerParty.AddPartyMember(characterManager.allCharacters[3].PartyPosition + 1, characterManager.allCharacters[3].Name); } } else { characterManager.allCharacters[3].PartyPosition = -1; } } }
public void LoadMainData() { if (Application.loadedLevel == 2) { //currencies loaded currencyManager = GetComponent <CurrencyManager>(); currencyUI = FindObjectOfType <CurrencyUI>(); currencyManager.Gold.Value = data.goldValue; currencyManager.Scrap.Value = data.scrapValue; currencyManager.Food.Value = data.foodValue; playerParty = FindObjectOfType <PlayerParty>(); if (data.seed != 0) { mapGen = FindObjectOfType <MapGenerator>(); mapGen.GenerateMap(data.seed); } inventoryDisplay = FindObjectOfType <InventoryDisplay>(); //loads item/ inventory info if (data.items != null) { InventoryItem[] inSceneITems = FindObjectsOfType <InventoryItem>(); /*foreach(InventoryItem item in inSceneITems) * { * inventoryDisplay.items.Add(item); * }*/ } foreach (string id in data.ids) { ids.Add(id); ids.Clear(); } foreach (EEquipmentType equip in data.itemTypes) { equipmentType.Add(equip); equipmentType.Clear(); } characterManager = FindObjectOfType <CharacterManager>(); //character 0 characterManager.allCharacters[0].Name = data.characterName0; characterManager.allCharacters[0].Level = data.characterLevel0; characterManager.allCharacters[0].MaxHealth = data.characterHealth0; characterManager.allCharacters[0].Strength = data.characterStrength0; characterManager.allCharacters[0].Dexterity = data.characterDexterity0; characterManager.allCharacters[0].Intelect = data.characterIntellect0; characterManager.allCharacters[0].Experience = data.characterExperience0; characterManager.allCharacters[0].EquipmentCapacity = data.characterEquipCap0; characterManager.allCharacters[0].CharacterType = data.characterType0; characterManager.allCharacters[0].isUnlocked = data.characterUnlocked0; //character 1 characterManager.allCharacters[1].Name = data.characterName1; characterManager.allCharacters[1].Level = data.characterLevel1; characterManager.allCharacters[1].MaxHealth = data.characterHealth1; characterManager.allCharacters[1].Strength = data.characterStrength1; characterManager.allCharacters[1].Dexterity = data.characterDexterity1; characterManager.allCharacters[1].Intelect = data.characterIntellect1; characterManager.allCharacters[1].Experience = data.characterExperience1; characterManager.allCharacters[1].EquipmentCapacity = data.characterEquipCap1; characterManager.allCharacters[1].CharacterType = data.characterType1; characterManager.allCharacters[1].isUnlocked = data.characterUnlocked1; //character 2 characterManager.allCharacters[2].Name = data.characterName2; characterManager.allCharacters[2].Level = data.characterLevel2; characterManager.allCharacters[2].MaxHealth = data.characterHealth2; characterManager.allCharacters[2].Strength = data.characterStrength2; characterManager.allCharacters[2].Dexterity = data.characterDexterity2; characterManager.allCharacters[2].Intelect = data.characterIntellect2; characterManager.allCharacters[2].Experience = data.characterExperience2; characterManager.allCharacters[2].EquipmentCapacity = data.characterEquipCap2; characterManager.allCharacters[2].CharacterType = data.characterType2; characterManager.allCharacters[2].isUnlocked = data.characterUnlocked2; //character 3 characterManager.allCharacters[3].Name = data.characterName3; characterManager.allCharacters[3].Level = data.characterLevel3; characterManager.allCharacters[3].MaxHealth = data.characterHealth3; characterManager.allCharacters[3].Strength = data.characterStrength3; characterManager.allCharacters[3].Dexterity = data.characterDexterity3; characterManager.allCharacters[3].Intelect = data.characterIntellect3; characterManager.allCharacters[3].Experience = data.characterExperience3; characterManager.allCharacters[3].EquipmentCapacity = data.characterEquipCap3; characterManager.allCharacters[3].CharacterType = data.characterType3; characterManager.allCharacters[3].isUnlocked = data.characterUnlocked3; //0 characterManager.allCharacters[0].IsPartyMember = data.characterInParty0; if (characterManager.allCharacters[0].IsPartyMember == true) { characterManager.allCharacters[0].PartyPosition = data.character0PartyPosition; if (characterManager.allCharacters[0].PartyPosition >= 0 && characterManager.allCharacters[0].PartyPosition < 3) { playerParty.AddPartyMember(characterManager.allCharacters[0].PartyPosition + 1, characterManager.allCharacters[0].Name); } } else { characterManager.allCharacters[0].PartyPosition = -1; } //1 characterManager.allCharacters[1].IsPartyMember = data.characterInParty1; if (characterManager.allCharacters[1].IsPartyMember == true) { characterManager.allCharacters[1].PartyPosition = data.character1PartyPosition; if (characterManager.allCharacters[1].PartyPosition >= 0 && characterManager.allCharacters[1].PartyPosition < 4) { playerParty.AddPartyMember(characterManager.allCharacters[1].PartyPosition + 1, characterManager.allCharacters[1].Name); } } else { characterManager.allCharacters[1].PartyPosition = -1; } //2 characterManager.allCharacters[2].IsPartyMember = data.characterInParty2; if (characterManager.allCharacters[2].IsPartyMember == true) { characterManager.allCharacters[2].PartyPosition = data.character2PartyPosition; if (characterManager.allCharacters[2].PartyPosition >= 0 && characterManager.allCharacters[2].PartyPosition < 3) { playerParty.AddPartyMember(characterManager.allCharacters[2].PartyPosition + 1, characterManager.allCharacters[2].Name); } } else { characterManager.allCharacters[2].PartyPosition = -1; } //3 characterManager.allCharacters[3].IsPartyMember = data.characterInParty3; if (characterManager.allCharacters[3].IsPartyMember == true) { characterManager.allCharacters[3].PartyPosition = data.character3PartyPosition; if (characterManager.allCharacters[3].PartyPosition >= 0 && characterManager.allCharacters[3].PartyPosition < 3) { playerParty.AddPartyMember(characterManager.allCharacters[3].PartyPosition + 1, characterManager.allCharacters[3].Name); } } else { characterManager.allCharacters[3].PartyPosition = -1; } //safty net of adding player to party since theres bug where he one gets deleted if (playerParty.characters[0] == null) { playerParty.characters[0] = characterManager.allCharacters[0]; } if (playerParty.characters[1] == null) { playerParty.characters[1] = characterManager.allCharacters[1]; } if (playerParty.characters[2] == null) { playerParty.characters[2] = characterManager.allCharacters[2]; } } }
public int SummaryScoreAccount(PlayerParty player) { return(player.ScoreAccount.Entries.Sum(x => x.Amount)); }
void Start() { audioSource = gameObject.GetComponent <AudioSource>(); currentFear = 0; playerParty = FindObjectOfType <PlayerBehaviour>().GetComponent <PlayerParty>(); }
void Start() { playerParty = FindObjectOfType <PlayerParty>(); }
private void LogRoundScore(PlayerParty player, Measurement score) { _accountContext.AddRoundsScoreEntry(player, score); }
public void SetParty(PlayerParty _Party) //리더 설정 { Party = _Party; navMesh.enabled = true; }
public void Start() { SetSelection(PlayerParty.FirstOrDefault()); }