Exemplo n.º 1
0
    // Use this for initialization
    void Start()
    {
        sceneManager = this.transform.root.GetComponent <LoadNewScene> ();
        string name = sceneManager.getPlayerName();

        if (name == "Captain Summers")
        {
            KinergyContent         = SummersKinergy;
            SummersKinergy.enabled = true;
        }
        if (name == "The Wonder")
        {
            KinergyContent        = WondieKinergy;
            WondieKinergy.enabled = true;
        }
        if (name == "X-42")
        {
            KinergyContent     = X42Kinergy;
            X42Kinergy.enabled = true;
        }
        if (name == "Ronin")
        {
            KinergyContent       = RoninKinergy;
            RoninKinergy.enabled = true;
        }
        KinergyContent.enabled = true;
    }
Exemplo n.º 2
0
    public void Quit()
    {
        LoadNewScene sceneManager = this.GetComponent <LoadNewScene> ();

        Resume();
        sceneManager.LoadScene("mainMenu");
    }
Exemplo n.º 3
0
    // Use this for initialization
    void Start()
    {
        myTrans = transform;

        LoadNewScene lo = (LoadNewScene)GetComponent("LoadNewScene");

        myTrans.position = lo.startingArea;
    }
Exemplo n.º 4
0
    private void CheckSceneLoaderTriggerEnter(Collider2D collider)
    {
        LoadNewScene sceneLoader = collider.gameObject.GetComponent <LoadNewScene>();

        if (sceneLoader != null)
        {
            startPointName = sceneLoader.newLevelStartPointName;
        }
    }
Exemplo n.º 5
0
    void Update()
    {
        loadNewScene = FindObjectOfType <LoadNewScene>();

        if (characterActive)
        {
            currentTime   += Time.deltaTime;
            timerText.text = FormatTime();
        }
    }
    void Update()
    {
        loadNewScene = FindObjectOfType <LoadNewScene>();

        try //set up so the last instance of characterSelector can be found without throwing an error
        {
            characterSelector = FindObjectOfType <CharacterSelector>();
            endTime           = characterSelector.GetCurrentTime(); //time is retrieved so it can be send the the end-of-the-game screen
        }
        catch
        {
            //pass
        }
    }
Exemplo n.º 7
0
    // Use this for initialization
    public void Start()
    {
        thePlayer = FindObjectOfType <PlayerController>();
        theLNS    = FindObjectOfType <LoadNewScene>();

        if (thePlayer.startPoint == pointName)
        {
            thePlayer.transform.position = transform.position;
            thePlayer.lastMove           = startFace;

            theCamera = FindObjectOfType <CameraController>();
            theCamera.transform.position = new Vector3(transform.position.x, transform.position.y, theCamera.transform.position.z);
        }
    }
Exemplo n.º 8
0
 // Use this for initialization
 void Start()
 {
     if (GameObject.FindGameObjectWithTag("SceneManager") == null)
     {
         sceneManager = Instantiate(sceneManagerObject).GetComponent <LoadNewScene> ();
     }
     else
     {
         sceneManager = GameObject.FindGameObjectWithTag("SceneManager").GetComponent <LoadNewScene> ();
     }
     cameraShake = camera.GetComponent <CameraShake> ();
     ogAmount    = cameraShake.shakeAmount;
     ogDecrease  = cameraShake.decreaseFactor;
     StartCoroutine(trainRattle());
 }
Exemplo n.º 9
0
    public override void CharacterChange(string direction)
    {
        isChanged = true;
        LoadNewScene sceneManager = FindObjectOfType <LoadNewScene> ();

        if (direction == "up")
        {
            sceneManager.CharacterChange("The Wonder", this.transform.position);
        }
        if (direction == "right" && facing == FacingDirection.West || direction == "left" && facing == FacingDirection.East)
        {
            sceneManager.CharacterChange("Captain Summers", this.transform.position);
        }
        if (direction == "right" && facing == FacingDirection.East || direction == "left" && facing == FacingDirection.West)
        {
            sceneManager.CharacterChange("X-42", this.transform.position);
        }
        StartCoroutine(waitForDestruction());
    }
Exemplo n.º 10
0
 void Start()
 {
     loadNewScene = FindObjectOfType <LoadNewScene>();
 }
Exemplo n.º 11
0
 void Awake()
 {
     sceneManager = GetComponentInParent <LoadNewScene> ();
 }
Exemplo n.º 12
0
 void Start()
 {
     cameraFollow  = camera.GetComponent <CameraFollow> ();
     effectManager = GameObject.FindObjectOfType <EffectManager> ();
     sceneManager  = GameObject.FindObjectOfType <LoadNewScene> ();
 }