public void BeginBattle() //кнопка "Начать бой" { BattleMechanics.GameStarted = true; BeginBattleButton.SetActive(false); GameObject.Find("Attack Button").GetComponent <Button>().enabled = true; GameObject.Find("Defence Button").GetComponent <Button>().enabled = true; GameObject.Find("Clear Button").GetComponent <Button>().enabled = true; GameObject.Find("Attack Scroll").transform.Find("Button").GetComponent <Button>().enabled = true; GameObject.Find("Heal Scroll").transform.Find("Button").GetComponent <Button>().enabled = true; GameObject.Find("Buff Scroll").transform.Find("Button").GetComponent <Button>().enabled = true; GameObject.Find("Sleep Scroll").transform.Find("Button").GetComponent <Button>().enabled = true; GameObject.Find("HP Potion").transform.Find("Button").GetComponent <Button>().enabled = true; GameObject.Find("Balsam Potion").transform.Find("Button").GetComponent <Button>().enabled = true; GameObject.Find("Poison Potion").transform.Find("Button").GetComponent <Button>().enabled = true; ReadAllInputInfo.GetScrollInfo(); //PlayerStats.CalculateStats(); //PlayerStats.MaxToCurrent(); Text logText = GameObject.Find("Log Field Text").GetComponent <Text>(); logText.text += "Итак, бой начинается! Выберите себе противника. По умолчанию, выбран первый Монстр(" + BattleMechanics.NpcList[BattleMechanics.SelectedNpc].Name + ").\n\r"; PlayerStats.PlayerNumbersToPercent(); BattleMechanics.InitiativeCount(); //foreach (var skills in NpcMonster.enemySkills) //{ // logText.text += "\n\rскил №" + skills + " добавлен в список активных скилов.\n\r"; //} }
public void ChangeWeaponTypeToCloseCombat() { if (PlayerStats.Initiative == 6 && BattleMechanics.GameStarted) { BattleMechanics.LogText.text += "\n\rУ Героя и так Ближний Бой.\n\r"; return; } PlayerStats.Initiative = 6; PlayerStats.DistanceAttack = false; if (BattleMechanics.GameStarted) { BattleMechanics.LogText.text += "\n\rГерой меняет своё оружие на Ближний Бой.\n\r"; PlayerStats.MadeTurn = true; PlayerStats.WeaponSwitch = true; BattleMechanics.TurnPhase(); BattleMechanics.InitiativeCount(); } }