// Use this for initialization
    void Start()
    {
        string currText;
        string currButton;
        string currTitle;

        game = SharedInfo.getCurrGame();
        if (game.getCollectionStatus().getTotalCollected() != game.getCollection().getTotal())
        {
            currText   = introText;
            currButton = introButton;
            currTitle  = introTitle;
        }
        else
        {
            currText   = endText;
            currButton = endButton;
            currTitle  = endTitle;
        }

        GameObject.Find("IntroEndPanel").GetComponentsInChildren <Text>()[0].text = currTitle;
        GameObject.Find("IntroEndPanel").GetComponentsInChildren <Text>()[1].text = currText;

        GameObject.Find("IntroEndPanel").GetComponentInChildren <Button>().GetComponentInChildren <Text>().text = currButton;
    }
Beispiel #2
0
    // Use this for initialization
    void Start()
    {
        game = SharedInfo.getCurrGame();

        updateArtefactButtons();
        updateWonButton();
    }
    public void loadLevel(int artefactId)
    {
        Artefact selectedArtefact = SharedInfo.getCurrGame().getCollection().getArtefactById(artefactId);

        SharedInfo.getCurrGame().setCurrentArtefact(selectedArtefact);
        Application.LoadLevel(levelToLoad);
    }
 void Start()
 {
     game             = SharedInfo.getCurrGame();
     draggingArtefact = false;
     isFirstTime      = false;
     waiting          = false;
     startPoint       = transform.position;
 }
Beispiel #5
0
    // Use this for initialization
    void Start()
    {
        game = SharedInfo.getCurrGame();

        artefactId            = game.getCollectionStatus().getNextToCollect();
        nextArtefactToCollect = game.getCollection().getArtefactById(artefactId);

        GameObject.Find("CluePanel").GetComponentsInChildren <Text>()[0].text = getTitleFromNumber(nextArtefactToCollect.getId() + 1);
        GameObject.Find("CluePanel").GetComponentsInChildren <Text>()[1].text = nextArtefactToCollect.getClue();
    }
    void Start()
    {
        game = SharedInfo.getCurrGame();

        // hide all artefact which are not the current one
        updateActiveArtefact();

        // set the content for the current artefact
        updateStoryPanelContent();
    }
Beispiel #7
0
        void Start()
        {
            game = SharedInfo.getCurrGame();


            mTrackableBehaviour = GetComponent <TrackableBehaviour>();
            if (mTrackableBehaviour)
            {
                mTrackableBehaviour.RegisterTrackableEventHandler(this);
            }
        }
Beispiel #8
0
 public void loadLevel()
 {
     if (levelToLoad == "Quit")
     {
         Application.Quit();
     }
     else
     {
         SharedInfo.getCurrGame().resetGame();
         Application.LoadLevel(levelToLoad);
     }
 }
 public void IntroEndloadLevel()
 {
     // Not finished
     if (SharedInfo.getCurrGame().getCollection().getTotal() != SharedInfo.getCurrGame().getCollectionStatus().getTotalCollected())
     {
         Application.LoadLevel("Clue");
     }
     else
     {
         Application.LoadLevel("Menu");
     }
 }
Beispiel #10
0
    void Start()
    {
        game = SharedInfo.getCurrGame();
        won  = (game.getCollection().getTotal() == game.getCollectionStatus().getTotalCollected());

        isJustCollected = game.isArtefactJustCollected();
        if (isJustCollected && !won)
        {
            levelToGo = "Clue";
            if (game.getCurrentArtefact().getId() == 0)            // Only for Anubis
            {
                SharedInfo.getSceneStatus().setUnvisited("AfterCollection");
            }
        }
        else
        {
            levelToGo = "Collection";
        }
    }
Beispiel #11
0
    // Use this for initialization
    void Start()
    {
        game = SharedInfo.getCurrGame();
        won  = (game.getCollection().getTotal() == game.getCollectionStatus().getTotalCollected());
        string statusMessage      = game.getCollectionStatus().getTotalCollected() + " out of " + game.getCollection().getTotal() + "\n artefacts collected";
        string wonMessage         = "";
        string continueButtonText = "Continue";

        if (won)
        {
            // Update status message
            wonMessage         = "You Won!";
            continueButtonText = "Go to Collection";

            // Create particle effect
            Transform containerTransform = GameObject.Find("Container").gameObject.transform;
            effect = (Transform)Instantiate(particlesEffect, containerTransform.position, containerTransform.rotation);
        }
        GameObject.Find("GameStatus").GetComponentInChildren <Text> ().text     = statusMessage;
        GameObject.Find("WonMessage").GetComponentInChildren <Text> ().text     = wonMessage;
        GameObject.Find("ContinueButton").GetComponentInChildren <Text> ().text = continueButtonText;
    }
Beispiel #12
0
    // Use this for initialization
    void Start()
    {
        game = SharedInfo.getCurrGame();

        spriteDown = Resources.Load <Sprite>("Sprites/Layout/down");
        spriteUp   = Resources.Load <Sprite>("Sprites/Layout/up");

        lastOrientation = getDeviceOrientation();

        if (isPanelUp())
        {
            currSprite = spriteDown;
        }
        else
        {
            currSprite = spriteUp;
        }

        // Everytime the screen is loaded, unless it is the time when the artefact has just been collected, keep the panel down.
        if (!game.isArtefactJustCollected() && isPanelUp())
        {
            buttonClicked = true;             // Simulate the click button to move the button down
        }
    }
Beispiel #13
0
 void Start()
 {
     game = SharedInfo.getCurrGame();
 }
Beispiel #14
0
 public void resetGame()
 {
     SharedInfo.getCurrGame().resetGame();
     //Application.LoadLevel (levelToLoad);
 }
 void Start()
 {
     game = SharedInfo.getCurrGame();
     touchInsideObject = false;
 }