本文整理汇总了C#中InputManager.Initialize方法的典型用法代码示例。如果您正苦于以下问题:C# InputManager.Initialize方法的具体用法?C# InputManager.Initialize怎么用?C# InputManager.Initialize使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类InputManager
的用法示例。
在下文中一共展示了InputManager.Initialize方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Start
void Start()
{
if (gManager == this)
{
isPaused = false;
iManager = new InputManager(0.1f, 0.2f); // It could be helpful, I guess.
tagged_objects = GameObject.FindGameObjectsWithTag("Scene_Object");
scene_objects = new ISceneObject[tagged_objects.Length];
iManager.Initialize();
// Initialize the list of scene objects, all of which have ONE ISceneObject component.
for (int i = 0; i < tagged_objects.Length; i++)
{
scene_objects[i] = tagged_objects[i].GetComponent<ISceneObject>(); // Grab all of those scene objects!
}
// Initialize all scene objects.
for (int j = 0; j < scene_objects.Length; j++)
{
scene_objects[j].Initialize();
}
levelDictionary = new Dictionary<GameState, string>() { { GameState.TLEVELONE, "GMLevel1" },
{ GameState.TLEVELTWO, "GMLevel2" },
{GameState.LEVELONE, "Level1" },
{GameState.LEVELTWO, "Level2" },
{ GameState.LEVELTHREE, "Level3"},
{GameState.LEVELFOUR, "Level4" } };
// This will break on regular levels, handle regular levels separately.
GameManager.gState = levelDictionary.FirstOrDefault(x => x.Value == _testLevelPrefix + SceneManager.GetActiveScene().name).Key;
if(GameManager.m_Camera != null)
{
transform.Find("PauseScreen").gameObject.GetComponent<Canvas>().worldCamera = GameManager.m_Camera;
}
}
}