private void Start() { steering = GetComponent <Steering>(); cameraCanvas = GameObject.FindGameObjectWithTag("MainUI").GetComponent <CameraCanvas>(); soundManager = FindObjectOfType <SoundManager>(); audioSource = GetComponent <AudioSource>(); }
private void MakeSingleton() { if (instance == null) { instance = this; } else { Destroy(gameObject); } }
public virtual void startApp() { Displayable current = Display.getDisplay(this).getCurrent(); if (current == null) { cameraCanvas = new CameraCanvas(this); displayCanvas = new DisplayCanvas(this); decodedTextBox = new DecodedTextBox(this); Display.getDisplay(this).setCurrent(cameraCanvas); cameraCanvas.start(); } else { if (current == cameraCanvas) { cameraCanvas.start(); } Display.getDisplay(this).setCurrent(current); } }
void Start() { cameraCanvas = GameObject.FindGameObjectWithTag("MainUI").GetComponent <CameraCanvas>(); player = GetComponent <Focus>().target.GetComponent <Steering>(); if (!GManager.singlePlayer) { horizontalInputName = player.horizontalInputName; verticalInputName = player.verticalInputName; } else { horizontalInputName = "Single Player Lighthouse Vertical"; verticalInputName = "Single Player Lighthouse Horizontal"; } light = GetComponent <Light>(); initialIntensity = light.intensity; //Activate(); }