public void FirstPageNext()
    {
        Debug.Log("Pressed 'Next' on page 1 of tutorial");

        // Goes to page 2
        currentState = TutorialStates.Page2;
    }
    public void SecondPageBack()
    {
        Debug.Log("Pressed 'Back' on page 2 of tutorial");

        // Goes to page 1
        currentState = TutorialStates.Page1;
    }
    public void ThirdPageBack()
    {
        Debug.Log("Pressed 'Back' on page 3 of tutorial");

        // Goes to page 2
        currentState = TutorialStates.Page2;
    }
Exemplo n.º 4
0
 private void FireComplete()
 {
     timeStateStart = Time.time;
     current_state  = GetNextState(current_state);
     StartNewState(current_state);
     AudioControl.Instance.PlayTutorialTaskComplete();
 }
    public void SecondPageNext()
    {
        Debug.Log("Pressed 'Next' on page 2 of tutorial");

        // Goes to page 3
        currentState = TutorialStates.Page3;
    }
Exemplo n.º 6
0
    void Awake()
    {
        SetLocalizedText();

        _incidentManager = GetComponent <IncidentManager>();

        _tutorialState = TutorialStates.Start;
        NextState();
    }
Exemplo n.º 7
0
    public void Reset()
    {
        currentTutorialState = TutorialStates.NONE;
        GameManager.Instance.StopAllCoroutines();

        MainUIManager.Instance.decisionUiController.UnPopDecisionBox();
        MainUIManager.Instance.decisionUiController.UnPopDialogueIcon();
        MainUIManager.Instance.decisionUiController.UnPopGenericTapIcon();
        MainUIManager.Instance.decisionUiController.UnPopTap();
    }
Exemplo n.º 8
0
 private void PlayGameComplete()
 {
     current_state = GetNextState(current_state);
     StartNewState(current_state);
     timeStateStart = Time.time;
     if (OnPlayGameEnd != null)
     {
         OnPlayGameEnd();
     }
     AudioControl.Instance.PlayTutorialTaskComplete();
 }
Exemplo n.º 9
0
 private void PickUpToolGoToPatientComplete()
 {
     current_state  = GetNextState(current_state);
     timeStateStart = Time.time;
     StartNewState(current_state);
     if (OnPickupToolsEnd != null)
     {
         OnPickupToolsEnd();
     }
     AudioControl.Instance.PlayTutorialTaskComplete();
 }
Exemplo n.º 10
0
 private void SurgeryOnPatientComplete()
 {
     timeStateStart = Time.time;
     current_state  = GetNextState(current_state);
     StartNewState(current_state);
     if (OnSurgeryOnPatientEnd != null)
     {
         OnSurgeryOnPatientEnd();
     }
     AudioControl.Instance.PlayTutorialTaskComplete();
 }
Exemplo n.º 11
0
 private void WashHandsComplete()
 {
     current_state = GetNextState(current_state);
     StartNewState(current_state);
     timeStateStart = Time.time;
     if (OnWashingHandsEnd != null)
     {
         OnWashingHandsEnd();
     }
     AudioControl.Instance.PlayTutorialTaskComplete();
 }
Exemplo n.º 12
0
 private void ScareAwayBearComplete()
 {
     timeStateStart = Time.time;
     current_state  = GetNextState(current_state);
     StartNewState(current_state);
     if (OnScareAwayBearEnd != null)
     {
         OnScareAwayBearEnd();
     }
     AudioControl.Instance.PlayTutorialTaskComplete();
 }
Exemplo n.º 13
0
 private void AnestheticMachineComplete()
 {
     if (OnAnestheticMachienEnd != null)
     {
         OnAnestheticMachienEnd();
     }
     timeStateStart = Time.time;
     current_state  = GetNextState(current_state);
     StartNewState(current_state);
     AudioControl.Instance.PlayTutorialTaskComplete();
 }
    // Update is called once per frame
    void Update()
    {
        if (currentState == TutorialStates.begin && Input.GetKeyDown (KeyCode.F)) {
            currentState = TutorialStates.fanUsed;
            this.guiText.text = "Click where you would like to place a fan. \nMove your cursor to decide the direction the fan will blow in \nClick to finalize the direction.\n The bubbles show the wind stream.";
        }
        if (currentState == TutorialStates.fanUsed && Input.GetMouseButtonDown(0)) {
            currentState = TutorialStates.fanPlaced;
            this.guiText.text = "You have a limited number of fans per level.\nPlace them carefully!";
        }

        //enemy.
    }
Exemplo n.º 15
0
 private void NextState()
 {
     _tutorialState = _tutorialState + 1;
     if (_tutorialState == TutorialStates.End)
     {
         // Go back to the main game
         SceneManager.LoadScene(0);
     }
     else
     {
         ShowNextTip();
     }
 }
Exemplo n.º 16
0
 private TutorialStates GetNextState(TutorialStates currState)
 {
     if (currState == TutorialStates.DONE)
     {
         SceneTransitionController.Instance.NextScene();
         return(currState);
     }
     else
     {
         return(currState + 1);
         // return (TutorailStates)(((int)currState) + 1);
     }
 }
    // Update is called once per frame
    void Update()
    {
        if (currentState == TutorialStates.first) {
            if(alienSprite.transform.position != toPos){
                float step = 1.5f * Time.deltaTime;

                // Move our position a step closer to the target.
                alienSprite.transform.position = Vector3.MoveTowards(alienSprite.transform.position, toPos, step);
            }else{
                alienSprite.transform.position = fromPos;
                currentState = TutorialStates.second;
                Text1.SetActive(false);
                Text2.SetActive(true);
            }
        }else if (TutorialStates.second == currentState){
            if(alienSprite.transform.position != toPos){
                doorSprite.SetActive(true);
                float step = 1.5f * Time.deltaTime;

                // Move our position a step closer to the target.
                alienSprite.transform.position = Vector3.MoveTowards(alienSprite.transform.position, toPos, step);
            }else{
                currentState = TutorialStates.third;
                Text2.SetActive(false);
                Text3.SetActive(true);
                bubble.SetActive(true);
                doorSprite.SetActive(false);
                fan.SetActive(true);
                 toPos = alienSprite.transform.position+new Vector3(7,0,0);
                time = Time.time;
            }
        }else if(currentState == TutorialStates.third){

            if(Time.time - time >2){
                if(alienSprite.transform.position != toPos){

                    float step = 1.5f * Time.deltaTime;

                    // Move our position a step closer to the target.
                    alienSprite.transform.position = Vector3.MoveTowards(alienSprite.transform.position, toPos, step);
                    bubble.transform.position = Vector3.MoveTowards(bubble.transform.position, toPos, step);
                }else{
                    Application.LoadLevel(0);
                }
            }

        }
    }
Exemplo n.º 18
0
    private void StartNewState(TutorialStates newState)
    {
        switch (newState)
        {
        case TutorialStates.WELCOME:
            StartWelcome();
            break;

        case TutorialStates.PLAY_GAME:
            StartPlayGame();
            break;

        case TutorialStates.WASH_HANDS:
            StartWashHands();
            break;

        case TutorialStates.PICK_UP_TOOL_GO_TO_PATIENT:
            StartPickUpToolGoToPatient();
            break;

        case TutorialStates.SURGERY_ON_PATIENT:
            StartSurgeryOnPatient();
            break;

        case TutorialStates.ANESTHETIC_MACHINE:
            StartAnestheticMachine();
            break;

        case TutorialStates.HEART_ATTACK:
            StartHeartAttack();
            break;

        case TutorialStates.FIRE:
            StartFire();
            break;

        case TutorialStates.SCARE_AWAY_RACCON:
            StartScareAwayRaccoon();
            break;

        case TutorialStates.SCARE_AWAY_BEAR:
            StartScareAwayBear();
            break;
        }
    }
Exemplo n.º 19
0
    // Update is called once per frame
    void Update()
    {
        if (currentState == TutorialStates.begin && enemy.hasBubble) {
            currentState = TutorialStates.bubbleTrapped;
            this.guiText.text = "Bubbles will pop once they hit the space ship.\nOnce an alien is trapped in a bubble it can be affected by\n wind and atmosphere changes. Press 1,2,3 to control Atmosphere" ;
            }

        if(currentState == TutorialStates.bubbleTrapped && gVars.atmosphereSelected!=0){
            currentState = TutorialStates.controlAtmosphere;
            this.guiText.text = "To win the level, you must get all the aliens to the matching coloured doors.\n You lose if you get the wrong alien to the wrong door.";
        }

        if (currentState == TutorialStates.controlAtmosphere && gVars.win) {
            currentState = TutorialStates.fanUsed;
            this.guiText.text = "Congrats! You Won!\n You can either restart the level, go to the next level,\n or go back to the main menu to select a different level.";
        }
        //enemy.
    }
Exemplo n.º 20
0
 private void stateChange()
 {
     if (enemyMage == null || enemyKnight == null)
     {
         currentTutorialState = TutorialStates.Boss;
     }
     else if (unlockedDoor.GetComponent <DoorController>().getOpen())
     {
         currentTutorialState = TutorialStates.enemeyTypes;
     }
     else if (enemy == null)
     {
         currentTutorialState = TutorialStates.unlockedDoor;
     }
     else if (door.GetComponent <DoorController>().getOpen())
     {
         currentTutorialState = TutorialStates.Enemy;
     }
     else if (chest.GetComponent <Chest_Controller>().getOpen())
     {
         currentTutorialState = TutorialStates.Door;
     }
 }
 private void Awake()
 {
     {
         currentState = TutorialStates.Page1;
     }
 }
Exemplo n.º 22
0
 public Tutorial(TextMeshProUGUI t)
 {
     this.text = t;
     state     = TutorialStates.Movement;
 }
Exemplo n.º 23
0
 public void InformTutorialStart()
 {
     current_state = 0;
     StartNewState(current_state);
 }
Exemplo n.º 24
0
 // Use this for initialization
 void Start()
 {
     currentTutorialState = TutorialStates.Chest;
 }
Exemplo n.º 25
0
        public override State Run(VirusManager virusMan, EnemySpawner enSpawn, Transform player)
        {
            if (Input.GetKey(KeyCode.Tab))
            {
                state = TutorialStates.Done;
            }
            int numberOfEnemiesAlive = enSpawn.GetNubmerOfEnemies();

            switch (state)
            {
            case TutorialStates.Movement:
                text.text = "Movement: \nW: Forward \nA: Left \nS: Backwards \nD: Right";
                if (player.position != lastPos)
                {
                    lastPos = player.position;
                    timer  -= Time.deltaTime;
                }
                if (timer <= 0)
                {
                    state = TutorialStates.Shooting;
                }

                break;

            case TutorialStates.Shooting:
                text.text = "Shooting: \nMouse = Aim \nLeft Click = Shoot \n\nKilling Enemey gives you Data \nKill 2 Enemies";

                if (numberOfEnemiesAlive < 3)
                {
                    //Select a enemy
                    int enemyIndexToSpawn = 0;
                    //Get a spawnOption
                    List <int> spawnOptions        = enSpawn.GetListOfValideSpawnLocations(player, 10, true);
                    int        selectedSpawnOption = spawnOptions[Random.Range(0, spawnOptions.Count)];
                    enSpawn.SpawnEnemy(enemyIndexToSpawn, selectedSpawnOption);
                }

                if (Statistics.INSTANCE.Kills >= 2)
                {
                    state = TutorialStates.Drone;
                }
                break;

            case TutorialStates.Drone:
                text.text = "Command Drone: \n1 = Follow me \n2 = Harvest Mode \n\nIn Harvest mode it will harvest Data from nodes.\nCollect 50 Data";

                if (virusMan.GetNumberOfActiveViruses() < 5)
                {
                    virusMan.ActivateANode();
                }
                if (numberOfEnemiesAlive < 2)
                {
                    //Select a enemy
                    int enemyIndexToSpawn = 0;
                    //Get a spawnOption
                    List <int> spawnOptions        = enSpawn.GetListOfValideSpawnLocations(player, 10, true);
                    int        selectedSpawnOption = spawnOptions[Random.Range(0, spawnOptions.Count)];
                    enSpawn.SpawnEnemy(enemyIndexToSpawn, selectedSpawnOption);
                }

                if (Statistics.INSTANCE.TotalOfDataGatherd >= 50)
                {
                    state = TutorialStates.Upgrade;
                }
                break;

            case TutorialStates.Upgrade:
                text.text = "Upgrades: \nT = Open Upgrade Page \n\n Buy 1 Upgrade";
                if (Statistics.INSTANCE.BoughtUpgrades >= 1)
                {
                    state = TutorialStates.Done;
                    timer = 2;
                }
                break;

            case TutorialStates.Done:
                text.text = "Tutorial Done";
                if (timer <= 0)
                {
                    text.text = string.Empty;
                    return(new LowRisk());
                }
                timer -= Time.deltaTime;
                break;

            default:
                break;
            }
            return(this);
        }
Exemplo n.º 26
0
 void None()
 {
     currentState = TutorialStates.None;
     MovingController.changingState -= None;
 }
Exemplo n.º 27
0
 // Use this for initialization
 void Start()
 {
     timeStateStart = Time.time;
     current_state  = TutorialStates.UNINITIALIZED;
 }