예제 #1
0
    public void loadGame()
    {
        achievementslPanel.SetActive(false);
        eraInfo.transform.Find("endGame_button").gameObject.SetActive(false);
        GameData.mainPanel = mainPanels[GameData.currentMainPanelIndex];
        mainPanel          = GameData.mainPanel;
        if (GameData.currentJobPanel != null)
        {
            jobToMain();
        }
        GameData.loadGame();
        changeMainPanel();
        EnergyBarManager.Instance.refreshEnergy();
        LoadText.readJson();
        loadEraText();
        if (GameData.currentMainPanelIndex == mainPanels.Length - 1)
        {
            eraInfo.transform.Find("endGame_button").gameObject.SetActive(true);
        }

        SoundManager.Instance.playMainSound();

        info_status_menu.gameObject.SetActive(true);
        info_status_menu.text = "Joc încărcat!";
        GameData.showedAchv   = false;
    }
예제 #2
0
 void Start()
 {
     loadText = GameObject.Find("EventSystem").GetComponent <LoadText>();
     LoadInDialogue(SceneManager.GetActiveScene().name);
     sceneFinished  = false;
     fadeController = gameObject.GetComponent <FadeController>();
 }
예제 #3
0
    void LoadingUI()
    {
        Debug.DrawRay(transform.position, transform.TransformDirection(Vector3.forward) * 80, Color.red);
        if (Physics.Raycast(transform.position, transform.TransformDirection(Vector3.forward), out hit, 200) && hit.transform.gameObject.tag == "Wall")
        {
            InfoText   = hit.transform.GetChild(0).GetChild(1).GetChild(0).GetComponent <Text>();
            textLoader = hit.transform.GetChild(0).GetChild(1).GetChild(0).GetComponent <LoadText>();
            textLoader.SetInfoText(InfoText);

            if (!voiceover.isPlaying)
            {
                voiceover.Play();
            }

            CanvasLoader = hit.transform.GetChild(0).GetComponent <LoadCanvas>();
            CanvasLoader.LoadTimer(1);
        }
        else
        {
            CanvasLoader.resetTimer(0);

            CanvasLoader.StartFadeOut(); // start the coroutine to close inventory
            if (!textLoader.TextComlp)
            {
                textLoader.StopText();
            }
        }
    }
예제 #4
0
 public void SetProgressValueAndMsg(int value, string msg)
 {
     if (value <= progressBar1.Maximum)
     {
         Invoke((MethodInvoker) delegate
         {
             progressBar1.Value = value;
             LoadText.Text      = msg;
             progressBar1.Invalidate();
             LoadText.Invalidate();
         });
     }
 }
예제 #5
0
 private void Awake()
 {
     initialize = transform.Find("initialize");
     load       = transform.Find("load");
     transform.Find("initialize/Image").gameObject.SetActive(true);
     StartCoroutine("play");
     ll         = load.transform.Find("load/load");
     LoadText   = load.Find("LoadText");
     t          = LoadText.GetComponent <Text>();
     sp         = Resources.LoadAll <Sprite>(AllPath.Instance.loadImg);
     g          = transform.Find("load/Text").GetComponent <Text>();
     ge         = transform.Find("initialize/Text").GetComponent <Text>();
     me         = transform.Find("initialize/me").GetComponent <Text>();
     voice      = GameObject.Find("voice");
     sound      = voice.AddComponent <AudioSource>();
     Timi_Logo  = Resources.Load <AudioClip>("Voice/Logo/Timi_Logo");
     sound.clip = Timi_Logo;
 }
예제 #6
0
 private void Start()
 {
     if (GameData.getFirstTime() == 0)   // este prima data cand utilizatorul deschide jocul
     {
         tutorialPanel.SetActive(true);
         GameData.initAchv();
     }
     // GameData.initAchv();
     loadGame();
     info_status_menu.text = "";
     LoadText.readJson();
     loadEraText();
     GameData.mainPanel = mainPanels[GameData.currentMainPanelIndex];
     return_button      = eraInfo.transform.Find("return_button").gameObject;
     qmark_button       = eraInfo.transform.Find("qmark_button").gameObject;
     book_button        = eraInfo.transform.Find("info_button").gameObject;
     return_button.SetActive(false);
     qmark_button.SetActive(false);
     book_button.SetActive(true);
 }
예제 #7
0
    public void endEra()
    {
        endOfEraPanel.SetActive(true);
        GameData.restoreEnergy();
        EnergyBarManager.Instance.refreshEnergy();
        if (currentJobPanel != null)
        {
            jobToMain();
        }
        GameData.currentMainPanelIndex++;
        changeMainPanel();
        EndOfEraManager.Instance.showDisasters();

        LoadText.readJson();
        loadEraText();

        if (GameData.currentMainPanelIndex == mainPanels.Length - 1)
        {
            eraInfo.transform.Find("endGame_button").gameObject.SetActive(true);
        }
    }
 void Start()
 {
     loadText = GameObject.Find("EventSystem").GetComponent <LoadText>();
     LoadInDialogue(SceneManager.GetActiveScene().name);
 }
 public async Task <IActionResult> Load([FromBody] LoadText command)
 => await _sentenceService.LoadAsync(command.Text)
        ? StatusCode(201)
        : StatusCode(204);
예제 #10
0
 void Start()
 {
     loadText = GetComponent <LoadText>();
 }
예제 #11
0
	void Start(){
        levelUp = GameObject.Find("levelUp");
        inventoryFull = GameObject.Find("inventoryFull");
        fireNoti = GameObject.Find("fireNoti");
        iceNoti = GameObject.Find("iceNoti");
        slowNoti = GameObject.Find("slowNoti");
        knockNoti = GameObject.Find("knockNoti");
        healNoti = GameObject.Find("healNoti");
        trapNoti = GameObject.Find("trapNoti");
        sameLetterNoti = GameObject.Find("sameLetterNoti");
        sameWordNoti = GameObject.Find("sameWordNoti");
        oneLetterNoti = GameObject.Find("oneLetterNoti");

        levelUpScript = levelUp.GetComponent<NotiController>();
        inventoryFullScript = inventoryFull.GetComponent<NotiController>();
        fireNotiScript = fireNoti.GetComponent<NotiController>();
        iceNotiScript = iceNoti.GetComponent<NotiController>();
        slowNotiScript = slowNoti.GetComponent<NotiController>();
        knockNotiScript = knockNoti.GetComponent<NotiController>();
        healNotiScript = healNoti.GetComponent<NotiController>();
        trapNotiScript = trapNoti.GetComponent<NotiController>();
        sameLetterNotiScript = sameLetterNoti.GetComponent<NotiController>();
        sameWordNotiScript = sameWordNoti.GetComponent<NotiController>();
        oneLetterNotiScript = oneLetterNoti.GetComponent<NotiController>();

        gameController = GameObject.Find("Game_Controller").GetComponent<Game_Controller>();
        noData = GameObject.Find("Nodata");
        OptionPanel = GameObject.Find("OptionPanel");
        CreditPanel = GameObject.Find("CreditPanel");
        DisclaimerPanel = GameObject.Find("DisclaimerPanel");
        swordPanel = GameObject.Find("SwordPanel").GetComponent<SwordPanel>();
        bowPanel = GameObject.Find("BowPanel").GetComponent<BowPanel>();
        clothPanel = GameObject.Find("ClothPanel").GetComponent<ClothPanel>();
        bootPanel = GameObject.Find("BootPanel").GetComponent<BootPanel>();
        inv = GameObject.Find("Inventory").GetComponent<Inventory>();
        TypingProgressDetail = GameObject.Find("TypingProgressDetail").GetComponent<Text>();
        currentGameDifficulty = GameObject.Find("currentGameDifficulty").GetComponent<Text>();
        characterLevel = GameObject.Find("CharacterLevel").GetComponent<Text>();
        characterWorld = GameObject.Find("CharacterWorld").GetComponent<Text>();
        characterStory = GameObject.Find("CharacterStory").GetComponent<Text>();
        wordDifficultyChar = GameObject.Find("WordDifficultyChar").GetComponent<Text>();
        gameDifficultyChar = GameObject.Find("GameDifficultyChar").GetComponent<Text>();
        skillFire = GameObject.Find("FireSkillPanel").GetComponent<Skill_Fire>();
        skillIce = GameObject.Find("IceSkillPanel").GetComponent<Skill_Ice>();
        skillSlow = GameObject.Find("SlowSkillPanel").GetComponent<Skill_Slow>();
        skillHeal = GameObject.Find("HealSkillPanel").GetComponent<Skill_Heal>();
        skillKnock = GameObject.Find("KnockSkillPanel").GetComponent<Skill_Knock>();
        skillTrap = GameObject.Find("TrapSkillPanel").GetComponent<Skill_Trap>();

        startPicture = GameObject.Find("StartPicture");
        clearButton = GameObject.Find("ClearButton");
        playerStatus = GameObject.Find("PlayerStatus");
        weaponPanel = GameObject.Find("WeaponPanel");
        skillPanel = GameObject.Find("SkillUse");
        typingProgressButton = GameObject.Find("TypingProgressButton");
        skillButton = GameObject.Find("SkillButton");
        inventoryButton = GameObject.Find("InventoryButton");
        optionButton = GameObject.Find("Option");
        objectivePanel = GameObject.Find("QuestDetail");

        newGameButton = GameObject.Find("Start Game");
        loadGameButton = GameObject.Find("Load Game");
        exitGameButton = GameObject.Find("Exit");

        ClearGameScene = GameObject.Find("ClearGameScene");
        LoadSaveCloseButton = GameObject.Find("CloseOfLoadSave");
        a = GameObject.Find("TextManager").GetComponent<textManager>();
        typingProgressMenu = GameObject.Find("TypingProgressPanel");
        mainMenu = GameObject.Find("LoadSavePanel");
        changeDiffMenu = GameObject.Find("ChangeDifficultyMenu");
        LoadScene = GameObject.Find("LoadScene");
        loadSceneScript = LoadScene.transform.GetChild(0).GetComponent<Text>().GetComponent<LoadText>();
        //checkInLoadText = LoadScene.transform.GetChild(0).GetComponent<Text>().GetComponent<LoadText>().check;
        SkillToolTip = GameObject.Find("SkillToolTip");
        SkillPanel = GameObject.Find("SkillPanel");
        detail = GameObject.Find("Detail").GetComponent<Text>();
        conversation = GameObject.Find("Conversation");
        blackScene = GameObject.Find("BlackScene");
        displayGameObj = GameObject.Find("Character");
        NPCnameGameObj = GameObject.Find("NPCTitle");
        talkGameObj = GameObject.Find("Talk");
        continueButton = GameObject.Find("Continue");
        choice1 = GameObject.Find("Choice1");
        choice2 = GameObject.Find("Choice2");

        display = displayGameObj.GetComponent<Image>();
        NPCname = NPCnameGameObj.transform.GetChild(0).GetComponent<Text>();
        talk = talkGameObj.GetComponent<Text>();
        choice1Text = choice1.transform.GetChild(0).GetComponent<Text>();
        choice2Text = choice2.transform.GetChild(0).GetComponent<Text>();

        levelUp.SetActive(false);
        inventoryFull.SetActive(false);
        fireNoti.SetActive(false);
        iceNoti.SetActive(false);
        slowNoti.SetActive(false);
        knockNoti.SetActive(false);
        healNoti.SetActive(false);
        trapNoti.SetActive(false);
        sameLetterNoti.SetActive(false);
        sameWordNoti.SetActive(false);
        oneLetterNoti.SetActive(false);

        noData.SetActive(false);
        OptionPanel.SetActive(false);
        DisclaimerPanel.SetActive(false);
        CreditPanel.SetActive(false);
        playerStatus.SetActive(false);
        weaponPanel.SetActive(false);
        skillPanel.SetActive(false);
        typingProgressButton.SetActive(false);
        skillButton.SetActive(false);
        inventoryButton.SetActive(false);
        objectivePanel.SetActive(false);

        clearButton.SetActive(false);
        ClearGameScene.SetActive(false);
        typingProgressMenu.SetActive(false);
        changeDiffMenu.SetActive(false);
        mainMenu.SetActive(false);
        blackScene.SetActive(false);
        displayGameObj.SetActive(false);
        NPCnameGameObj.SetActive(false);
        talkGameObj.SetActive(false);
        continueButton.SetActive(false);
        choice1.SetActive(false);
        choice2.SetActive(false);
        conversation.SetActive(false);
        SkillPanel.SetActive(false);
        SkillToolTip.SetActive(false);
        LoadScene.SetActive(false);

		playerInThisMap = GameObject.FindGameObjectWithTag ("Player").GetComponent<Player> ();
		GameObject[] enemySpawn = GameObject.FindGameObjectsWithTag("Enemy");
		GameObject[] treasureInMap = GameObject.FindGameObjectsWithTag("Treasure");

		foreach(GameObject enemy in enemySpawn){
			enemyInThisMap.Add(enemy.GetComponent<Enemy>());
		}

		foreach(GameObject enemy in enemySpawn){
			enemy.SetActive(false);
		}

        playerInThisMap.gameObject.SetActive(false);

		foreach (GameObject chest in treasureInMap) {

			treasureMinigame.Add (chest.GetComponent<Treasure>());
		}
       
    }
예제 #12
0
 private void loadEraText()
 {
     eraInfo.transform.Find("name_of_era").GetComponent <Text>().text = LoadText.getName_of_era();
     eraInfo.transform.Find("part_of_era").GetComponent <Text>().text = LoadText.getPart_of_era();
 }
예제 #13
0
 public void Start()
 {
     _loatText = new LoadText();
     _loatText.Initialize();
     SetShader();
 }
예제 #14
0
 void LoadInDialogue(string level, LoadText loadText)
 {
     loadText.Load(NPCSpeech.text, LoadText.characters.npc);
     isDone = true;
 }
예제 #15
0
 void Start()
 {
     novelGameManager = GameObject.FindGameObjectWithTag("NovelGameManager");
     loadText         = novelGameManager.GetComponent <LoadText>();
 }