Example #1
0
 private void Start()
 {
     steering     = GetComponent <Steering>();
     cameraCanvas = GameObject.FindGameObjectWithTag("MainUI").GetComponent <CameraCanvas>();
     soundManager = FindObjectOfType <SoundManager>();
     audioSource  = GetComponent <AudioSource>();
 }
Example #2
0
 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);
		}
	}
Example #4
0
    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();
    }
Example #5
0
    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);
        }
    }