using System.Collections; using System.Collections.Generic; using UnityEngine; public class databaseState : MonoBehaviour { //プレイヤーの情報 static public int currentExp = 0; static public int nextExp = 100; static public int currentLv = 1; static public bool showLvupMes = false; // 追加機体 static public bool openMachine02 = false; static public bool openMachine03 = false; // Use this for initialization void Start () { } // Update is called once per frame void Update () { } public static void StateUpdate() { //レベルアップ処理 if (currentExp >= nextExp) { currentLv += 1; currentExp = nextExp - currentExp; showLvupMes = true; } //レベルから次の必要経験値を計算 nextExp = currentLv * 100; } public static void UpdateExp() { //経験値計算 if (variableManage.myTeamID == variableManage.gameResult) { //自分のチームが勝利 currentExp += Mathf.RoundToInt(variableManage.startTime * 0.4f); } else { //自分のチームが敗北 currentExp += Mathf.RoundToInt(variableManage.startTime * 0.15f); } } }