Example #1
0
 void Start()
 {
     lib       = GetComponent <Library>();
     inv       = GetComponent <Inventary>();
     Equip     = GetComponent <Equipment>();
     MouseItem = GetComponent <MouseItem>();
 }
Example #2
0
 void Start()
 {
     lib       = GetComponent <Library>();
     inv       = GetComponent <Inventary>();
     upgrade   = GetComponent <Upgrader>();
     MouseItem = GetComponent <MouseItem>();
 }
Example #3
0
 // Start is called before the first frame update
 void Start()
 {
     FindObjectOfType <AudioMnager>(true).SetAudio();
     mechanics = GameObject.FindGameObjectWithTag("Player").GetComponent <Mechanics>();
     player    = GameObject.FindGameObjectWithTag("Player").GetComponent <PlayerStats>();
     inventary = Inventary.inventary;
     SetEnemyHealth();
 }
Example #4
0
 // Start is called before the first frame update
 void Awake()
 {
     if (inventary == null)
     {
         inventary = this;
     }
     else if (inventary != this)
     {
         Destroy(gameObject);
     }
     DontDestroyOnLoad(gameObject);
 }
Example #5
0
    void OnEnable()
    {
        SetStatus(true);
        inventary = Game.Instance.inventary;
        qty = inventary.GetQty(id);

        IslandsManager.DataIsland dataIsland = Game.Instance.islandsManager.activeIsland;

        if (id == 3) { if (!dataIsland.madera) SetStatus(false); else SetStatus(true); }
        if (id == 4) { if (!dataIsland.arena) SetStatus(false); else SetStatus(true); }
        if (id == 5) { if (!dataIsland.piedras) SetStatus(false); else SetStatus(true); }
        SetQty();
    }
Example #6
0
    void Awake()
    {
        QualitySettings.vSyncCount = 1;

        if (!mInstance)
        {
            mInstance = this;
        }
        else
        {
            Destroy(this.gameObject);
            return;
        }

        DontDestroyOnLoad(this.gameObject);

        Scene actual = SceneManager.GetActiveScene();

        currentLevelIndex = actual.buildIndex;
        currentLevel      = actual.name;

        phoneConversationsData  = GetComponent <PhoneConversationsData> ();
        interactiveObjectsTexts = GetComponent <InteractiveObjectsTexts> ();
        gameProgress            = GetComponent <GameProgress> ();
        inventary     = GetComponent <Inventary> ();
        triviaData    = GetComponent <TriviaData> ();
        dialoguesData = GetComponent <DialoguesData> ();
        users         = GetComponent <Users> ();

        int val = PlayerPrefs.GetInt("user");

        Debug.Log(val);
        if (val > 0)
        {
            Data.Instance.esAlumno = true;
        }

        if (esAlumno)
        {
            FBase_Login(false);
        }
    }
Example #7
0
    void Awake()
    {
        if (!mInstance)
            mInstance = this;
        //otherwise, if we do, kill this thing
        else
        {
            Destroy(this.gameObject);
            return;
        }

        islandsManager = GetComponent<IslandsManager>();
        inventary = Data.Instance.GetComponent<Inventary>();
        mainMenu = GetComponent<MainMenu>();
        gameManager = GetComponent<GameManager>();
        minigamesManager = GetComponent<MinigamesManager>();
        islandDistances = GetComponent<IslandDistances>();

        Invoke("StartGame", 1f);
    }
Example #8
0
 private void Awake()
 {
     Instance = this;
     grids    = GetComponentsInChildren <Grid>();
 }
Example #9
0
    void Start()
    {
        userID = PlayerPrefs.GetString("userID");
        username = PlayerPrefs.GetString("username", "");
        password = PlayerPrefs.GetString("password");
        email = PlayerPrefs.GetString("email");
        passwordValidated = PlayerPrefs.GetInt("passwordValidated", 0);
        distanceTraveled = PlayerPrefs.GetInt("distanceTraveled", 0);
        totalBlocksNotes = PlayerPrefs.GetInt("totalBlocksNotes", 0);

        if (username == "") firstTimeHere = true;

        islandActive = PlayerPrefs.GetInt("islandActive", 1);
        missionActive = PlayerPrefs.GetInt("missionActive", 0);

        inventary = GetComponent<Inventary>();

        inventary.nafta = PlayerPrefs.GetInt("nafta", 0);
        inventary.comida = PlayerPrefs.GetInt("comida", 0);
        inventary.madera = PlayerPrefs.GetInt("madera", 0);
        inventary.arena = PlayerPrefs.GetInt("arena", 0);
        inventary.piedras = PlayerPrefs.GetInt("piedras", 0);

        Events.OnShipArrived += OnShipArrived;
        Events.OnSaveInventary += OnSaveInventary;
        Events.OnNewMission += OnNewMission;
        Events.OnMissionComplete += OnMissionComplete;
        Events.OnResetApp += OnResetApp;
        Events.NewDistanceTraveled += NewDistanceTraveled;
        Events.OnSaveBlock += OnSaveBlock;
    }
Example #10
0
 void Start()
 {
     inventary = gameObject.GetComponent <Inventary>();
     inventaryUI.GetComponent <InventaryController>().inventary = inventary;
 }