本文整理汇总了C#中Ball.setStatus方法的典型用法代码示例。如果您正苦于以下问题:C# Ball.setStatus方法的具体用法?C# Ball.setStatus怎么用?C# Ball.setStatus使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Ball
的用法示例。
在下文中一共展示了Ball.setStatus方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: initLevel
/*
INITLEVEL: restarts the current level, resets ball status and position; respawns any destructibles.
*/
public void initLevel()
{
print("Level initialized");
GameMenuLose = GameObject.Find("LoseMenu");
GameMenuWin = GameObject.Find("WinMenu");
RespawnableObjects = GameObject.FindGameObjectsWithTag("BuildOnEnd");
RespawnableObjectsWithParticles = GameObject.FindGameObjectsWithTag("BuildOnEndParticleChild");
// Initlevel may have an external call
objectBall = GameObject.Find("RollerBall");
theBall = (Ball)objectBall.GetComponent(typeof(Ball));
//Default parameters
Resume();
GameMenuWin.SetActive(false);
GameMenuLose.SetActive(false);
theBall.Respawn();
CountText.text = (lvl_timer).ToString();
theBall.setStatus(0);
CurrentTime = 0;
for (int i = 0; i< RespawnableObjects.Length; i++)
{
print(RespawnableObjects[i].name);
RespawnableObjects[i].GetComponent<Collider>().enabled = true;
RespawnableObjects[i].GetComponent<Renderer>().enabled = true;
}
/*
VERY IMPORTANT THE STRUCTURE OF A PARTICLE POWERUP MUST BE OF THE STRUCTURE
POWERUP_
.CHILD PARTICLE 1 ->SPACE(0)
.CHILD PARTICLE 2 ->SPACE(1)
*/
for (int i = 0; i <RespawnableObjectsWithParticles.Length; i++)
{
print("Respanwed: "+RespawnableObjectsWithParticles[i].name);
RespawnableObjectsWithParticles[i].GetComponent<Collider>().enabled = true;
RespawnableObjectsWithParticles[i].transform.GetChild(0).GetComponent<ParticleSystem>().enableEmission = true;
RespawnableObjectsWithParticles[i].transform.GetChild(1).GetComponent<ParticleSystem>().enableEmission = true;
}
}