Skip to content

Commit

Permalink
hide spawn 38 cameras button
Browse files Browse the repository at this point in the history
  • Loading branch information
Snow committed Oct 14, 2020
1 parent 07cd6f6 commit c93072f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 31 deletions.
32 changes: 2 additions & 30 deletions CameraPlus/CameraMovement.cs
Original file line number Diff line number Diff line change
Expand Up @@ -98,31 +98,6 @@ public class Movements
public float Delay;
public bool EaseTransition = true;
}

public static T[] FindObjectOfInterfaces<T>() where T : class
{
List<T> findList = new List<T>();

foreach (var component in GameObject.FindObjectsOfType<Component>())
{
var obj = component as T;

if (obj == null) continue;

findList.Add(obj);
}

T[] findObjArray = new T[findList.Count];
int count = 0;

foreach (T obj in findList)
{
findObjArray[count] = obj;
count++;
}
return findObjArray;
}

public class CameraData
{
public bool ActiveInPauseMenu = true;
Expand Down Expand Up @@ -171,15 +146,12 @@ public virtual void OnActiveSceneChanged(Scene from, Scene to)
{
if (to.name == "GameCore")
{
/*
var gp = FindObjectOfInterfaces<IGamePause>().First();
if (gp!=null && dataLoaded && !data.ActiveInPauseMenu)
var gp = Resources.FindObjectsOfTypeAll<PauseController>().First();
if (gp && dataLoaded && !data.ActiveInPauseMenu)
{
Logger.Log($"Pause Register", LogLevel.Notice);
gp.didResumeEvent += Resume;
gp.didPauseEvent += Pause;
}
*/
}
}

Expand Down
3 changes: 2 additions & 1 deletion CameraPlus/ContextMenu.cs
Original file line number Diff line number Diff line change
Expand Up @@ -193,11 +193,12 @@ void OnGUI()
{
profileMode = true;
}
/*
if (GUI.Button(new Rect(menuPos.x, menuPos.y + 385, 300, 30), new GUIContent("Spawn 38 Cameras")))
{
parentBehaviour.StartCoroutine(CameraUtilities.Spawn38Cameras());
parentBehaviour.CloseContextMenu();
}
}*/
if (GUI.Button(new Rect(menuPos.x, menuPos.y + 430, 300, 30), new GUIContent("Close Menu")))
{
parentBehaviour.CloseContextMenu();
Expand Down

0 comments on commit c93072f

Please sign in to comment.