コード例 #1
0
    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);
    }
コード例 #2
0
    private void Start()
    {
        playerPickupObjs = FindObjectOfType <PickupObjects>();

        //TimeManager.Instance.StartTimer(2, CreateNewQuest);
        TimeManager.Instance.StartTimer(0, CreateNewQuest);
    }
コード例 #3
0
    private void OnDestroy()
    {
        PickupObjects pickup = FindObjectOfType <PickupObjects>();

        if (pickup != null)
        {
            pickup.ObjDestroyed(this.gameObject);
        }
    }
コード例 #4
0
 void Start()
 {
     movement           = gameObject.GetComponentInChildren <CharacterMovement>();
     MiscItems          = gameObject.GetComponentInChildren <MiscellaneousItemsDatabase>();
     GatheringSkill     = gameObject.GetComponentInChildren <GatheringSkillDatabase>();
     terrain            = GameObject.FindGameObjectWithTag("MainEnvironment").GetComponent <TerrainScript>();
     Stats              = gameObject.GetComponentInChildren <CharacterStats>();
     ItemPickup         = gameObject.GetComponentInChildren <PickupObjects>();
     characterInventory = terrain.canvas.GetComponentInChildren <CharacterInventoryGUI>();
     mainGUI            = terrain.canvas.GetComponentInChildren <MainGUI>();
     ItemID             = transform.GetComponentInChildren <WeaponSwitch>();
 }
コード例 #5
0
 void Awake()
 {
     mirroredCube = this.transform.Find("Mirrored Cube").gameObject;
     sphereObject = this.transform.Find("SphereTooltip").gameObject;
     initializeControllers();
     pickupObjs = sphereObject.AddComponent <PickupObjects>();
     if (squadEnabled == true)
     {
         menu = sphereObject.GetComponent <SquadMenu>();
         menu.sphereCasting = this;
     }
     pickupObjs.sphereCasting = this;
 }
コード例 #6
0
 // Use this for initialization
 void Start()
 {
     newpickup = new PickupObjects();
 }