void Start()
    {
        terrain         = GameObject.FindWithTag("MainEnvironment").GetComponentInChildren <TerrainScript>();
        InventoryManage = new List <InventoryManager>();
        Debug.Log("inv spawned");
        DroppedItemList = new List <InventoryManager>();

        EquipWeapon   = terrain.Player.GetComponentInChildren <WeaponsDatabase>();
        EquipArmor    = terrain.Player.GetComponentInChildren <ArmorDatabase>();
        SwitchWeapons = terrain.Player.GetComponentInChildren <WeaponSwitch>();
        SwitchArmor   = terrain.Player.GetComponentInChildren <ArmorSwitch>();
        Stats         = terrain.Player.GetComponentInChildren <CharacterStats>();
        MiscItems     = terrain.Player.GetComponentInChildren <MiscellaneousItemsDatabase>();
        ToolItems     = terrain.Player.GetComponentInChildren <ToolDatabase>();
        RockOre       = terrain.Player.GetComponentInChildren <MineRocks>();
        TreeLog       = terrain.Player.GetComponentInChildren <ChopTrees>();
        Herbs         = terrain.Player.GetComponentInChildren <Herbloring>();
        ItemsPickup   = terrain.Player.GetComponentInChildren <PickupObjects>();
        Potions       = terrain.Player.GetComponentInChildren <PotionDatabase>();
        movement      = terrain.Player.GetComponentInChildren <CharacterMovement>();
        skillbarGUI   = terrain.canvas.GetComponent <MainGUI>().characterSkillsBarGUI;

        Invoke("TestingPurposes", 4);
        InvokeRepeating("CombineStacks", 4, 3);
    }
Exemple #2
0
    void Start()
    {
        PickUpItemCoolDown = Time.time;

        RockDB      = gameObject.GetComponentInChildren <MineRocks>();
        TreeDB      = gameObject.GetComponentInChildren <ChopTrees>();
        MiscDB      = gameObject.GetComponentInChildren <MiscellaneousItemsDatabase>();
        WeaponDB    = gameObject.GetComponentInChildren <WeaponsDatabase>();
        ToolsDB     = gameObject.GetComponentInChildren <ToolDatabase>();
        HerbPatchDB = gameObject.GetComponentInChildren <Herbloring>();
        PotionDB    = gameObject.GetComponentInChildren <PotionDatabase>();
        terrain     = GameObject.FindWithTag("MainEnvironment").GetComponentInChildren <TerrainScript>();
        inventory   = terrain.canvas.GetComponentInChildren <CharacterInventoryGUI>();
    }