本文整理匯總了C#中CharacterController.GetActNumber方法的典型用法代碼示例。如果您正苦於以下問題:C# CharacterController.GetActNumber方法的具體用法?C# CharacterController.GetActNumber怎麽用?C# CharacterController.GetActNumber使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類CharacterController
的用法示例。
在下文中一共展示了CharacterController.GetActNumber方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: DeleteDoubles
//Удаление всех дублей, начиная с номера number, а также переключение управления на парадоксальный дубль
public void DeleteDoubles(int number, CharacterController paradox)
{
GameObject[] doubles = GameObject.FindGameObjectsWithTag (Tags.character);
for (int i=0; i<doubles.Length; i++)
{
if (doubles [i].GetComponent<CharacterController> ().GetNumber () > number)
{
Destroy (doubles [i]);
//doubles [i].GetComponent<CharacterController> ().SetReturning();
}
}
for (int i=chronology.chronology.Count-1; i>number; i--)
{
if (i<appearances.Count)
appearances.RemoveAt(i);
chronology.chronology.RemoveAt(i);
}
PlayerPrefs.SetFloat ("beginTime", 0f);
for (int i=0;i<appearances.Count;i++)
{
if (appearances[i].time<PlayerPrefs.GetFloat("beginTime"))
PlayerPrefs.SetFloat("beginTime", appearances[i].time);
}
for (int i=chronology.chronology[number].sequence.Count-1; i>paradox.GetActNumber(); i--)
chronology.chronology [number].sequence.RemoveAt (i);
paradox.underControl = true;
mainCharacter = paradox.transform;
begin = false;
}