using UnityEngine;
using System.Collections;
public class PlayerStats : MonoBehaviour {
[System.Serializable]
public class BaseStats {
string name;
int currentLevel;
int targetLevel = currentLevel + 1;
int currentHp;
int maxHp;
int currentAp;
int maxAp;
int strength;
int toughness;
int agility;
int intelligence;
int willPower;
int luck;
int attack;
int hitPercentage;
int defence;
int defPercentage;
int powerAttack;
int powerDefence;
int powerDefPercentage;
int totalExp;
int totalExpNeeded;
int expTilLevel;
int expMod;
int expBase;
int levelBaseStart = [(targetLevel- 2 ) / 10] * 10 + 2;
}
void AddExp(int experience){
// Update is called once per frame
void Update () {
}
}
我以为 [ ] 取了这个数字并把它变成了一个整数,如果不是这样,我该怎么做?我正在制作 exp 变量以在我的等式中使用来计算达到某个水平所需的总 exp。在此先感谢!!!