本文整理汇总了C#中Student.retStuStatus方法的典型用法代码示例。如果您正苦于以下问题:C# Student.retStuStatus方法的具体用法?C# Student.retStuStatus怎么用?C# Student.retStuStatus使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Student
的用法示例。
在下文中一共展示了Student.retStuStatus方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Update
// Update is called once per frame
void Update()
{
myStudent = GameObject.Find("battleBackground").GetComponent<BattleButtonManage>().CurrentMine;
enemyStudent = GameObject.Find("battleBackground").GetComponent<BattleButtonManage>().CurrentEnemy;
if (myStudent.retStuStatus() == status.fire)
blend = 0;
else if (myStudent.retStuStatus() == status.none)
blend = 0.2f;
else if (myStudent.retStuStatus() == status.paralysis)
blend = 0.4f;
else if (myStudent.retStuStatus() == status.poison)
blend = 0.6f;
else if (myStudent.retStuStatus() == status.sleep)
blend = 0.8f;
else if(myStudent.retStuStatus() == status.faint)
blend = 1.0f;
anim.SetFloat("Blend", blend);
}
示例2: checkBattleTurnStartEvent
//student doesn't move on this turn when return 1(by sleep), 2(by paralyze). 0 is normal.
public int checkBattleTurnStartEvent(Student stu)
{
if (stu.retStuStatus() == status.sleep)
{
float value = Random.value;
if (value <= 0.2f) {
stu.giveAStatus(status.none);
return 0;
}
else {
return 1;
}
}
if (stu.retStuStatus() == status.paralysis)
{
float value = Random.value;
if (value <= 0.25f)
{
return 0;
}
else
{
return 2;
}
}
return 0;
}
示例3: checkBattleTurnEndEvent
public void checkBattleTurnEndEvent(Student stu)
{
if (stu.retStuStatus() == status.poison)
stu.getDamage((int)(stu.retStuStat(5)*5.0/8));
}