本文整理汇总了C#中Question.getQuestion方法的典型用法代码示例。如果您正苦于以下问题:C# Question.getQuestion方法的具体用法?C# Question.getQuestion怎么用?C# Question.getQuestion使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Question
的用法示例。
在下文中一共展示了Question.getQuestion方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: OnCollisionEnter
// Update is called once per frame
void OnCollisionEnter(Collision other)
{
if(other.collider.tag == "Collision")
{
Debug.Log("Enemy wall collision");
if (!right)
{
Debug.Log("Force Right Added");
rb.AddForce(0.0F, 0.0F, (5.0F * speed));
right = true;
}
else
{
Debug.Log(rb.velocity.z);
rb.AddForce(0.0F, 0.0F, (-5.0F * speed));
right = false;
Debug.Log("Force Left Added");
}
}
else if(other.collider.tag == "Player")
{
Time.timeScale = 0.0F;
question = new Question(1, 10);
text.text = question.getQuestion();
asked = true;
}
}
示例2: OnCollisionEnter
void OnCollisionEnter(Collision other)
{
if(other.collider.tag == "Enemy")
{
Time.timeScale = 0.0F;
qst = new Question(1, 9);
text.text = qst.getQuestion();
questionAsked = true;
currentEnemy = other.collider;
}
}