public void Start() { DialogSystem = FindObjectOfType <MB_DialogSystem>().gameObject; buildmanager = GameObject.Find("GameManager").GetComponent <NS_BuildManager>(); // This was because dialog system's start function is broken. DialogSystem.GetComponent <MB_DialogSystem>().WaveSpawner = GameObject.FindObjectOfType <NS_WaveSpawner>().gameObject; Instructions.text = InstructionsString; InstructionsArray = DialogInstructions; InstructionsString = InstructionsArray[0]; //var dialog = DialogSystem.GetComponent<MB_DialogSystem>(); //StartCoroutine(dialog.ShowReconDialog(InstructionsString)); StartCoroutine(Init()); }
void Start() { rend = GetComponent <Renderer>(); startColor = rend.material.color; startMat = rend.material; Buildmanager = NS_BuildManager.instance; pause = FindObjectOfType <NWB_PauseGame>().gameObject; AchievmentThingy = FindObjectOfType <MB_AchievementObserver>().gameObject; // Tells the script what the achievement observer is... // DebugObject = FindObjectOfType<NWB_DebugMenu>().gameObject; // Debug Menu. // var DebugMenu = DebugObject.GetComponent<NWB_DebugMenu>(); // DebugMenu.nodes.Add(this.gameObject); // Added this node to the DebugMenu's list.... if (notActive == true) { // rend.material.color = Color.black; rend.material = inActiveMat; } }
private void Start() { BuildManager = NS_BuildManager.instance; }
void Awake() { instance = this; }