本文整理汇总了C#中Stat.current方法的典型用法代码示例。如果您正苦于以下问题:C# Stat.current方法的具体用法?C# Stat.current怎么用?C# Stat.current使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Stat
的用法示例。
在下文中一共展示了Stat.current方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Player_Stats
public Player_Stats() {
int[] val_temp = new int[11];
Stat_Cost[] cost_temp = new Stat_Cost[10];
// initialize health values
for (int idx = 0; idx < val_temp.Length; ++idx) {
val_temp[idx] = (int)(1.5f * idx * idx) + 8 * idx + 5;
}
// initialize stat costs
for (int idx = 0; idx < cost_temp.Length; ++idx) {
cost_temp[idx] = new Stat_Cost(0, (int)(0.35f * idx * idx) + 9 * idx + 6);
}
MAX_HEALTH = new Stat(STAT_TYPE.health, val_temp, cost_temp);
health = (int)MAX_HEALTH.current();
HP_raised = true;
val_temp = new int[11];
cost_temp = new Stat_Cost[10];
// initialize shield values
for (int idx = 0; idx < val_temp.Length; ++idx) {
val_temp[idx] = (int)(0.55f * idx * idx) + 5 * idx + 3;
}
// initialize stat costs
for (int idx = 0; idx < cost_temp.Length; ++idx) {
cost_temp[idx] = new Stat_Cost((int)(0.19f * idx * idx) + 2 * idx + 3, 0);
}
MAX_SHIELD = new Stat(STAT_TYPE.shield, val_temp, cost_temp);
shield = (int)MAX_SHIELD.current();
Shield_raised = true;
WEAPONS = new WeaponStats[4];
WEAPONS[0] = new WeaponStats(0);
WEAPONS[1] = new WeaponStats(1);
WEAPONS[2] = new WeaponStats(2);
WEAPONS[3] = new WeaponStats(3);
held_weapon = WEAPON_TYPE.sword;
scrap = 0; //2573
energyCores = 0; //1197
MEDPACKS = new Stat(STAT_TYPE.other, new int[] { 0, 1, 2, 3 },
new Stat_Cost[] { new Stat_Cost(1, 5), new Stat_Cost(3, 18), new Stat_Cost(5, 43) } );
}