Esempio n. 1
0
 void Awake()
 {
     _playerStats   = GameObject.FindGameObjectWithTag(Tags.Player).GetComponent <PlayerStats>();
     _loadingScreen = GameObject.FindGameObjectWithTag(Tags.GameController).GetComponent <LoadingScreen>();
     _saveLoadData  = GameObject.FindGameObjectWithTag(Tags.SaveLoadObject).GetComponent <SaveLoadDataSerialized>();
     _wwwScreenShot = GameObject.FindGameObjectWithTag(Tags.GameController).GetComponent <WWWScreenshot>();
 }
Esempio n. 2
0
    void Start()
    {
        GameObject saveData = GameObject.FindGameObjectWithTag(Tags.SAVE);

        _saveLoadData = saveData.GetComponent <SaveLoadDataSerialized> ();

        stats = GetComponent <UserStats> ();

        text.text = txt [0];
    }
Esempio n. 3
0
 void Awake()
 {
     _saveLoadData   = GameObject.FindGameObjectWithTag(Tags.SaveLoadObject).GetComponent <SaveLoadDataSerialized>();
     _mainMenuPanel  = GameObject.Find("MenuPanel");
     _creditsPanel   = GameObject.Find("CreditsPanel");
     _optionsPanel   = GameObject.Find("OptionsPanel");
     _characterPanel = GameObject.Find("CharacterPanel");
     _deletionPanel  = GameObject.Find("DeletionPanel");
     _usernamePanel  = GameObject.Find("UsernamePanel");
     _rankingCanvas  = GameObject.Find("RankingCanvas");
 }
Esempio n. 4
0
 void Awake()
 {
     if (Instance)
     {
         Destroy(this.gameObject);
     }
     else
     {
         DontDestroyOnLoad(gameObject);
         Instance = this;
     }
 }
Esempio n. 5
0
    void Awake()
    {
        if (spawned == false)
        {
            spawned = true;

            DontDestroyOnLoad(transform.gameObject);
        }
        else
        {
            DestroyImmediate(gameObject); //This deletes the new objects that might be created
        }

        _saveLoadData = GameObject.FindGameObjectWithTag(AllTagsConstants.saveLoadData).GetComponent <SaveLoadDataSerialized>();
    }
Esempio n. 6
0
    void Start()
    {
        _autoType = gameObject.GetComponent <AutoType> ();
        _story    = gameObject.GetComponent <Story> ();

        GameObject saveData = GameObject.FindGameObjectWithTag(Tags.SAVE);

        save = saveData.GetComponent <SaveLoadDataSerialized> ();

        GameObject uiContr = GameObject.FindGameObjectWithTag(Tags.UI_CONTROLLER);

        talk = uiContr.GetComponent <TalkScript> ();

        GameObject joystick = GameObject.FindGameObjectWithTag(Tags.JOYSTICK_CONTROLLER);

        this.joystick = joystick.GetComponent <Joystick> ();

        GameObject player = GameObject.FindGameObjectWithTag(Tags.PLAYER);

        _playerController = player.GetComponent <PlayerController>();
        //QuestData.questDone = 1;
    }
 void Awake()
 {
     if(Instance)
     {
         Destroy(this.gameObject);
     }
     else
     {
         DontDestroyOnLoad(gameObject);
         Instance = this;
     }
 }
Esempio n. 8
0
 void Awake()
 {
     _playBack     = GameObject.FindGameObjectWithTag(Tags.GameController).GetComponent <PlayBack> ();
     _saveLoadData = GameObject.FindGameObjectWithTag(Tags.SaveLoadObject).GetComponent <SaveLoadDataSerialized>();
 }
Esempio n. 9
0
    void Start()
    {
        GameObject saveData = GameObject.FindGameObjectWithTag(Tags.SAVE);

        _save = saveData.GetComponent <SaveLoadDataSerialized> ();
    }
Esempio n. 10
0
 void Start()
 {
     loadData = gameObject.GetComponent <SaveLoadDataSerialized> ();
     loadData.Load();
     //loadData.LoadChoosenCharacter ();
 }