Beispiel #1
0
	// Use this for initialization
	void Start () {
		player = GameObject.FindGameObjectWithTag ("Player").transform;
		gameScript = GameObject.Find("Game_Controller").GetComponent<Game_Controller>();
		textManagerScript = GameObject.Find("TextManager").GetComponent<textManager>();
		textTyping[1].text = textManagerScript.sendText(wordLength,wordDifficult);
		HPEnemyScript = transform.GetChild(2).GetChild(0).GetComponent<HPEnemy>();
	}
    // Start is called before the first frame update

    private void Awake()
    {
        if (instance == null)
        {
            instance = this;
        }
        else if (instance != this)
        {
            Destroy(gameObject);
        }
    }
Beispiel #3
0
	// Use this for initialization
	void Start () {
		QnTPn.Close ();
		QnTPnC.Close ();
		gameScript = GameObject.Find("Game_Controller").GetComponent<Game_Controller>();
		textManagerScript = GameObject.Find("TextManager").GetComponent<textManager>();
		HPEnemyScript = transform.GetChild(2).GetChild(0).GetComponent<HPEnemy>();
		textTyping [0].text = setOfQuiz [0];
		textTyping [2].text = setOfQuiz [2];
		textTyping [4].text = setOfQuiz [3];
		textTyping [6].text = setOfQuiz [1];
	}
Beispiel #4
0
 private void Awake()
 {
     if (Continue == null)
     {
         Continue = this;
         DontDestroyOnLoad(this);
     }
     else if (Continue != this)
     {
         Destroy(gameObject);
     }
 }
	// Use this for initialization
	void Start () {
		PRG_Controller.Close ();
		PRG_STSC.Close ();
		gameScript = GameObject.Find("Game_Controller").GetComponent<Game_Controller>();
		textManagerScript = GameObject.Find("TextManager").GetComponent<textManager>();
		HPEnemyScript = transform.GetChild(2).GetChild(0).GetComponent<HPEnemy>();
		textTyping [1].text = paragraph [0];
		sentence1 = textTyping [1].text;
		textTyping [3].text = paragraph [1];
		sentence2 = textTyping [1].text;
		textTyping [5].text = paragraph [2];
		sentence3 = textTyping [1].text;
		textTyping [7].text = paragraph [3];
		sentence4 = textTyping [1].text;
	}
Beispiel #6
0
    private void Awake()
    {
        DontDestroyOnLoad(gameObject);
        Player         = GetComponent <PlayerManager>();
        mission        = GetComponent <MissionManager>();
        dataMana       = GetComponent <DataManager>();
        textMana       = GetComponent <textManager>();
        _startSequence = new List <IGameManager>();

        _startSequence.Add(Player);
        _startSequence.Add(mission);
        _startSequence.Add(dataMana);
        _startSequence.Add(textMana);

        StartCoroutine(StartupManager());
    }
	// Use this for initialization
	void Start () {
        DontDestroyOnLoad(transform.gameObject);
        a = GameObject.Find("TextManager").GetComponent<textManager>();
        inv = GameObject.Find("Inventory").GetComponent<Inventory>();
	}
	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>());
		}
       
    }
 // Use this for initialization
 void Start () {
     textManagerScript = GameObject.Find("TextManager").GetComponent<textManager>();
     player = GameObject.FindGameObjectWithTag("Player").transform;
 }
 void Start()
 {
     textManagerScript = GameObject.Find("TextManager").GetComponent<textManager>();
 }
Beispiel #11
0
	void Awake(){
		DontDestroyOnLoad(transform.gameObject);
		rbd2D = GetComponent<Rigidbody2D> ();
		anim = GetComponent<Animator> ();
		textscript = GameObject.Find ("TextManager").GetComponent<textManager> ();
	}