public void Initialize() { initialized = true; formationWaypoints = Object.FindObjectsOfType <FormationWaypoint>(); textureAnimatorSystem = World.GetExistingManager <TextureAnimatorSystem>(); InitializeSpawnPoints(); }
public void OnGUI() { if (textureAnimatorSystem == null) { textureAnimatorSystem = World.Active.GetExistingManager <TextureAnimatorSystem>(); } int totalUnits = textureAnimatorSystem.lod0Count + textureAnimatorSystem.lod1Count + textureAnimatorSystem.lod2Count + textureAnimatorSystem.lod3Count; var oldSize = GUI.skin.label.fontSize; GUI.skin.label.fontSize = 28; GUILayout.BeginHorizontal(); GUILayout.Label("FPS: " + fps.ToString("0.00") + "\nUnits: " + totalUnits, GUILayout.Width(300f), GUILayout.Height(800f)); GUILayout.EndHorizontal(); GUI.skin.label.fontSize = oldSize; }
private void Start() { spawner = FindObjectOfType <Spawner>(); formationWaypoints = FindObjectsOfType <FormationWaypoint>(); textureAnimatorSystem = World.Active.GetExistingManager <TextureAnimatorSystem>(); }