Пример #1
0
	public void AddNewItem(CollectableItem item)
    {
        item.Added();

        Destroy(item.gameObject);
        CurrentScore++;
        
        if (CurrentScore >= GameManager.current.NeededScore)
        {
            FinalItemTossInSound.Play();

            LeanTween.color(Glyph.gameObject, Color.white, 1f);

            GameManager.current.UIManage.SkillBar.Close();

            ItemAddedParticle.SetActive(true);
            StartCoroutine(DeactivateParticle());
        }
		else {
			// still some collectibles to add
			GameManager.current.ShowXMoreToGoMessage(GameManager.current.NeededScore - currScore);

			ExtraBubblesPS.Play();
		}
    }
Пример #2
0
 // Use this for initialization
 void Start()
 {
     cameraRight = GameObject.Find ("CameraRight").GetComponent<OVRCamera> ();
     rabbit = GameObject.Find ("rabbit_doll_holder").GetComponent<CollectableItem> ();
     //		Debug.Log ("HeadPointer, cameraRight = " + cameraRight);
     //		Debug.Log ("Camera.main = " + Camera.main);
     Debug.Log ("rabbit = " + rabbit);
 }
        private CollectableItem[] BuildCollectableItems()
        {
            const int Count = 8;

            var items = new CollectableItem[Count];
            for (var i = 0; i < Count; ++i)
                items[i] = new CollectableItem(this, i);
            return items;
        }
Пример #4
0
        private CollectableItem[] BuildCollectableItems()
        {
            const int Count = 8;

            CollectableItem[] items = new CollectableItem[Count];
            for (int i = 0; i < Count; ++i)
            {
                items[i] = new CollectableItem(this, i);
            }
            return(items);
        }
Пример #5
0
 public void UseFruitOfType(CollectableItem item)
 {
     if (PlayerFruitEater.Usable(item.seedType))
     {
         PlayerFruitEater.Eat(item.seedType);
         fruits.RemoveItem(item);
     }
     else
     {
         Debug.Log("Unusable!");
     }
 }
Пример #6
0
    public GameObject makeRandomItem(Vector3 location)
    {
        CollectableItem itemType = itemTypes[Random.Range(0, itemTypes.Length - 1)];

        var item = (GameObject)Instantiate(itemPrefab);

        item.transform.position = location;
        item.renderer.material  = itemType.itemMaterial;
        item.AddComponent(itemType.implementingBehaviourClassName);

        return(item);
    }
Пример #7
0
    public void UseItem(InventorySlot slot)
    {
        CollectableItem thisItem = slot.item;

        // HealthBar.curHealth


        //Make popup window appear with item sprite or somethis....
        //Do you want to use this item???
        //If ok clicked, Remove item plus do whatevs and close popup...
        //if not...close popup and do nada
    }
Пример #8
0
    // Update is called once per frame
    void Update()
    {
        AmmoToReload = Date.Ammo;
        if (Input.GetButtonDown("Fire1") && CurrentMag > 0)
        {
            WeaponShoot.Play();
        }
        else if (Input.GetButtonUp("Fire1") || CurrentMag == 0)
        {
            WeaponShoot.Stop();
        }
        if (Input.GetButton("Fire1") && Time.time > nextFire && CurrentMag > 0)
        {
            nextFire = Time.time + firerate;
            ParticleSystem Muzzel = MuzzelFlash.GetComponent <ParticleSystem>();
            CurrentMag -= 1;
            Muzzel.Play();
            shoot();
        }
        if (Input.GetKeyDown(KeyCode.R))
        {
            Reload();
        }

        RaycastHit CollectableHitInfo;

        if (Physics.Raycast(cam.transform.position, cam.transform.forward, out CollectableHitInfo, 10, Collectable))
        {
            PressF.SetActive(true);
            CollectableItem Item = CollectableHitInfo.collider.GetComponent <CollectableItem>();
            GameObject      hit  = CollectableHitInfo.transform.gameObject;
            if (Input.GetKeyDown(KeyCode.F) && CollectableHitInfo.collider != null)
            {
                if (Item.Tag == "Ammo")
                {
                    AmmoToReload += Item.count;
                    print(Date.Ammo);
                    Destroy(hit);
                }
                else if (Item.tag == "weapon")
                {
                    print("this is new weapon !?");
                }
            }
        }
        else
        {
            PressF.SetActive(false);
        }
        Mag.text  = CurrentMag.ToString();
        Date.Ammo = AmmoToReload;
    }
Пример #9
0
 private bool Add(CollectableItem item)
 {
     for (int i = 0; i < itemList.Count; i++)
     {
         if (itemList[i] == null)
         {
             itemList[i]            = item;
             inventorySlots[i].item = item;
             return(true);
         }
     }
     return(false);
 }
Пример #10
0
    void OnCollisionEnter2D(Collision2D coll)
    {
        if (coll.gameObject.GetComponent <CollectableItem>() != null)
        {
            CollectableItem item = coll.gameObject.GetComponent <CollectableItem>();
            carrying[item.GetItemType()] += 1;

            Debug.Log("Received " + item.GetItemType());

            Destroy(coll.gameObject);
            UpdateDisplay();
        }
    }
Пример #11
0
    public void useItem(CollectableItem temp)
    {
        Debug.Log(temp.seedType);

        if (temp.itemType == CollectableItem.ItemType.seed)
        {
            seeds.RemoveItem(temp);
        }
        if (temp.itemType == CollectableItem.ItemType.item)
        {
            items.RemoveItem(temp);
        }
    }
Пример #12
0
    public void AddItem(CollectableItem item)
    {
        if (itemList.Count < 20)
        {
            itemList.Add(item);

            UpdateSlotUI();
        }
        else
        {
            bagFullText.text = "Your bag is full! Please remove any items that you don't need.";
            Destroy(bagFullText, 5);
        }
    }
Пример #13
0
    void UpdateTarget()
    {
        if (isCollector)
        {
            target = null;
            GameObject[] collectables     = GameObject.FindGameObjectsWithTag(collectableTag);
            float        shortestDistance = Mathf.Infinity;
            GameObject   nearestItem      = null;
            foreach (GameObject item in collectables)
            {
                float distanceToCollectable = Vector3.Distance(transform.position, item.transform.position);
                if (distanceToCollectable < shortestDistance)
                {
                    shortestDistance = distanceToCollectable;
                    nearestItem      = item;
                }
            }
            if (nearestItem != null && shortestDistance <= range)
            {
                target            = nearestItem.transform;
                targetCollectable = nearestItem.GetComponent <CollectableItem>();
            }
            return;
        }
        else
        {
            GameObject[] enemies          = GameObject.FindGameObjectsWithTag(enemyTag);
            float        shortestDistance = Mathf.Infinity;
            GameObject   nearestEnemy     = null;
            foreach (GameObject enemy in enemies)
            {
                float distanceToEnemy = Vector3.Distance(transform.position, enemy.transform.position);
                if (distanceToEnemy < shortestDistance)
                {
                    shortestDistance = distanceToEnemy;
                    nearestEnemy     = enemy;
                }
            }
            if (nearestEnemy != null && shortestDistance <= range)
            {
                target      = nearestEnemy.transform;
                targetEnemy = nearestEnemy.GetComponent <Enemy>();
            }

            else
            {
                target = null;
            }
        }
    }
Пример #14
0
    protected bool AddAmmoItem(InventoryItemAmmo inventoryItemAmmo, CollectableItem collectableAmmo)
    {
        foreach (var a in _ammo)
        {
            if (a.Ammo == null)
            {
                a.Ammo = inventoryItemAmmo;
                inventoryItemAmmo.Pickup(collectableAmmo.transform.position);
                return(true);
            }
        }

        return(false);
    }
Пример #15
0
        public Item(Texture2D sprite, Vector2 position, CollectableItem ItemType, bool selected, int inventorySlot)
        {
            Sprite = sprite;
              Selected = selected;
              Type = ItemType;

              int x = (int)position.X;
              int y = (int)position.Y;

              int sx = 0;
              int sy = (int)ItemType * FRAME_HEIGHT;

              DestRect = new Rectangle(x, y, FRAME_WIDTH, FRAME_HEIGHT);
              SourceRect = new Rectangle(sx, sy, FRAME_WIDTH, FRAME_HEIGHT);
        }
Пример #16
0
    protected bool AddFoodItem(InventoryItemFood inventoryItem, CollectableItem collectableItem)
    {
        foreach (var food in _foods)
        {
            if (food.Item == null)
            {
                food.Item         = inventoryItem;
                food.attachedItem = collectableItem;
                inventoryItem.Pickup(collectableItem.transform.position);
                return(true);
            }
        }

        return(false);
    }
Пример #17
0
    public static void AddInteractable(CollectableItem interactable)
    {
        interactables.Add(interactable);
        CurrentWeight += interactable.Weight < 0 ? 0 : interactable.Weight;

        if (CurrentWeight >= MaximumWeight && MaximumWeight > 0)
        {
            IsFull = true;
        }
        else
        {
            IsFull = false;
        }

        OnAddItemToInventoryEvent?.Invoke(interactable);
    }
Пример #18
0
    private CollectableItem GetRandomBonus()
    {
        LevelProps levelProps = obstacleSpawner.GetLevelProps();

        int bonusCount = levelProps.levelParachutes.Length;

        CollectableItem randomCollectable = levelProps.levelParachutes[UnityEngine.Random.Range(0, bonusCount)]
                                            .GetComponent <CollectableItem>();

        while (randomCollectable.collectableType == CollectableItem.CollectableType.RandomCollectable)
        {
            randomCollectable = levelProps.levelParachutes[UnityEngine.Random.Range(0, bonusCount)]
                                .GetComponent <CollectableItem>();
        }

        return(randomCollectable);
    }
Пример #19
0
 public void setItem(itemSave temp)
 {
     if (temp.cnt == 0)
     {
         icon.enabled  = false;
         count.enabled = false;
     }
     else
     {
         icon.enabled  = true;
         count.enabled = true;
         item          = temp.item;
         count.text    = temp.cnt.ToString();
         icon.sprite   = temp.item.icon;
         icon.SetNativeSize();
     }
 }
Пример #20
0
    void HitTarget()
    {
        if (impactEffect)
        {
            GameObject effectIns = (GameObject)Instantiate(impactEffect, transform.position, transform.rotation);
            Destroy(effectIns, 5f);
        }
        CollectableItem collectedItem = target.GetComponent <CollectableItem>();

        if (collectedItem != null)
        {
            collectedItem.Collect();
        }

        parent.GetComponent <Turret>().Reload();
        Destroy(gameObject);
    }
Пример #21
0
 public virtual void OnLevelLoad(bool state)
 {
     questCompleted = state;
     if (itemsEaten)
     {
         foreach (GameObject item in itemsRequired)
         {
             //check for Gem items when quest completed
             CollectableItem collItem = item.GetComponent <CollectableItem>();
             if (questCompleted && collItem != null && collItem.IsGem)
             {
                 GameObject gem = Instantiate(item);
                 gem.transform.position = transform.position;
                 gem.GetComponent <CollectableItem>().Eaten(transform);
             }
         }
     }
 }
Пример #22
0
 private void OnItemPickup(CollectableItem item, GameObject gameObject)
 {
     if (item.name == "Coin")
     {
         Destroy(gameObject);
         int currentCoins = PlayerPrefs.GetInt("coins");
         PlayerPrefs.SetInt("coins", ++currentCoins);
         GameEvents.current.PickupCoin();
     }
     else if (item.name == "Magnet")
     {
         Destroy(gameObject);
         int currentMagnets = PlayerPrefs.GetInt("powerup_magnet_count");
         PlayerPrefs.SetInt("powerup_magnet_count", ++currentMagnets);
         Debug.Log(currentMagnets);
         // OnMagnetPickup(gameObject);
     }
 }
Пример #23
0
 private void OnCollisionEnter2D(Collision2D collision)
 {
     if (collision.gameObject.GetComponent <CollectableItem>())
     {
         CollectableItem collectableItem = collision.gameObject.GetComponent <CollectableItem>();
         if (collectableItem.type == type)
         {
             UpdateScore(2);
             UpdateType(collectableItem.type);
             UpdateSprite(collectableItem.GetSprite(type));
         }
         else
         {
             UpdateScore(-1);
         }
         Destroy(collectableItem.gameObject);
     }
 }
Пример #24
0
    public void ReceiveItemFromController(IInteractable item)
    {
        try
        {
            interactableItem = item;
        }
        catch
        {
            interactableItem = null;
        }

        try
        {
            collectableItem = (CollectableItem)item;
        }
        catch
        {
            collectableItem = null;
        }
    }
Пример #25
0
    /// <summary>
    /// make the items appear in the correct location on screen
    /// </summary>
    protected void DisplayItems()
    {
        int index = 0;

        foreach (string item in Items.Keys)
        {
            //position item relative to inventoryUI
            Items[item].transform.localPosition = new Vector2(0.0f, offsetY + (index * spacing));

            CollectableItem collectableitem = Items[item].GetComponent <CollectableItem>();
            //create a new Item label if needed
            if (index >= itemLabels.Count - 1)
            {
                inventoryUI.GetComponent <InventoryDisplay>().CreateItemLabel(index + 1);
            }
            itemLabels[index].SetLabel(collectableitem.ItemType, collectableitem.ItemStyle);

            index++;
        }
        inventoryRenderer.size = new Vector2(2.0f, 3.0f + (index * 1.5f));
    }
Пример #26
0
    public void AddItem(CollectableItem newItem)
    {
        //Debug.Log("add fruit "+ newItem.name + " " + newItem.itemType);
        bool exist = false;

        foreach (itemSave slot in itemList)
        {
            if (slot.item == null)
            {
                continue;
            }
            else if (slot.cnt > 0 && slot.item.name == newItem.name)
            {
                exist = true;
                slot.cnt++;
            }
        }
        if (!exist)
        {
            bool full = true;
            foreach (itemSave slot in itemList)
            {
                if (slot.cnt == 0)
                {
                    full      = false;
                    slot.cnt  = 1;
                    slot.item = newItem;
                    break;
                }
            }
            if (full)
            {
                Debug.Log("inventory full");
            }
        }
        if (onItemChangedCallBack != null)
        {
            onItemChangedCallBack.Invoke();
        }
    }
Пример #27
0
    public void WriteBonus(CollectableItem bonus)
    {
        string collectableText = langSupport.GetText(bonus.collectableType.ToString());

        if (bonus.collectableType != CollectableItem.CollectableType.CoinScore)
        {
            bonusText.text     = collectableText;
            bonusImage.enabled = true;
            bonusImage.sprite  = Resources.Load <Sprite>(bonusResourcesPath + bonus.collectableType.ToString());

            bonusSlider.value = 1;
            bonusSlider.gameObject.SetActive(true);
        }

        cloneTextIndex = collectableText.IndexOf("(Clone)");
        if (cloneTextIndex > 0)
        {
            collectableText = collectableText.Substring(0, cloneTextIndex);
        }

        textSpawner.spawnText(collectableText);
    }
Пример #28
0
 // In innovative mode, ghosts can pick up fruits and apply some special effects
 public override void OnPickupItem(CollectableItem item)
 {
     // effect does apply in Classic mode
     if (gameData.currentMode == GameData.Mode.ClassicMode)
     {
         return;
     }
     // if the fruit has special effect then apply it
     // if effect is a positive effect, apply to all the ghosts
     if (item.effect != null)
     {
         if (item.effect.type == EffectType.IncreaseSpeed)
         {
             gameData.AddEffectToGhosts(item.effect);
         } // if effect is a negative effect, apply to oponents (Pacmans)
         else if (item.effect.type == EffectType.ReduceSpeed)
         {
             gameData.AddEffectToPacman(item.effect);
         }
     }
     UnityEngine.Object.Destroy(item.gameObject);
 }
Пример #29
0
    public virtual void GiveReward()
    {
        if (rewardInstance == null)
        {
            return;
        }

        float   divFactor      = rewardInstance.transform.localScale.sqrMagnitude / rewardInstance.transform.localScale.x;
        Vector3 originPosition = transform.position + Vector3.up * transform.localScale.y * 0.8f;

        for (int i = 0; i < finalRewards; i++)
        {
            int dirIndex = i % direction.Length;

            Vector3 position = originPosition +
                               Vector3.up * (i / direction.Length * rewardInstance.transform.localScale.y / divFactor) +        //height
                               transform.forward * direction [dirIndex].y * rewardInstance.transform.localScale.z / divFactor + //forward
                               transform.right * direction [dirIndex].x * rewardInstance.transform.localScale.x / divFactor;    //horizontal


            GameObject      reward = Instantiate(rewardInstance, position, rewardInstance.transform.rotation) as GameObject;
            CollectableItem item   = reward.GetComponent <CollectableItem> ();
            if (item != null)
            {
                if (throwRewardItemsAway)
                {
                    item.OnHit(transform.position);
                }
                else
                {
                    item.canThrowAway = false;
                    item.EnableThrowAway();
                }
            }
        }
    }
Пример #30
0
    public override void OnPickupItem(CollectableItem item)
    {
        if (item.effect != null)
        {
            appliedEffect = item.effect;
            appliedEffect.StartDurationCountDown();
        }



        if (item is InventoryItem)
        {
            if (item.tag == "banana")
            {
                bananaCount += 1;
                return;
            }

            if (item.tag == "book")
            {
                bookCount += 5;
                return;
            }

            if (item.tag == "Axe")
            {
                AxeNum += 1;
                return;
            }
        }

        if (!(item is Traps))
        {
            GameManager.instance.workLoad -= 5;
        }
    }
Пример #31
0
 public abstract void OnPickupItem(CollectableItem item);
Пример #32
0
    /// <summary>
	/// Drop current collectible
	/// </summary>
	/// <returns>The collectible.</returns>
	public CollectableItem DropCollectable () {
		if (currCollectable != null)
		{
            lastTimeTossed = Time.time;
			CollectableItem item = currCollectable;
			currCollectable.transform.parent = null;
			currCollectable = null;
			// TODO: box should fall or stick to ground level
			myPathfinder.speed = NormalSpeed;  // character recovers normal speed when not holding item
			return item;
		}

		Debug.LogWarning("Player character cannot drop feed block: no feed block in hand");
		return null;
	}
 public abstract bool AddItem(CollectableItem collectableItem, bool playAudio = true);
Пример #34
0
 public abstract bool AddItem(CollectableItem collectableItem);
Пример #35
0
 public void addItem(CollectableItem item)
 {
     //		Debug.Log("_items manager/addItem, item = " + item.name + ", description = " + item.description);
     EventCenter.Instance.addNote(item.itemName + " added to inventory");
     _itemsHash.Add(item.name, item);
 }
Пример #36
0
 public void drawDetail()
 {
     EventCenter.Instance.enablePlayer(false);
     //		Debug.Log("drawDetail = " + this.showDetail + ", _detailInventoryItem = " + _detailInventoryItem);
     if(_detailInventoryItem != null) {
         var detailImgLeft = Screen.width / 2 - DETAIL_IMG_WIDTH_HEIGHT / 2;
         var detailImgTop = Screen.height / 2 - DETAIL_IMG_WIDTH_HEIGHT / 2;
         Rect detailRect = new Rect(detailImgLeft, detailImgTop, DETAIL_IMG_WIDTH_HEIGHT + 10, DETAIL_IMG_WIDTH_HEIGHT + 50);
         this.drawBackground("Item detail: " + _detailInventoryItem.itemName);
         // Debug.Log("building detail of: " + _detailInventoryItem.name);
         GUI.Box(detailRect, _detailInventoryItem.description);
         GUI.DrawTexture(new Rect(detailImgLeft + 5, detailImgTop + 45, DETAIL_IMG_WIDTH_HEIGHT, DETAIL_IMG_WIDTH_HEIGHT), _detailInventoryItem.iconTexture);
         if(GUI.Button(new Rect(detailImgLeft - 100, 75, 100, 20), "back")) {
             _detailInventoryItem = null;
             this.showDetail = false;
             this.showInventory = true;
         }
     } else {
         Debug.Log("ERROR: _detailInventoryItem is null");
         this.showDetail = false;
         this.showInventory = false;
     }
 }
Пример #37
0
    public void drawSummary()
    {
        EventCenter.Instance.enablePlayer(false);
        int j;
        int k;
        //		InventoryItem currentInventoryItem = null;
        CollectableItem currentInventoryItem = null;
        Rect currentRect;
        this.drawBackground ("Inventory");

        int i = 0;
        Hashtable _tempItems = _itemsHash;
        foreach (DictionaryEntry key in _tempItems) {
            currentInventoryItem = key.Value as CollectableItem;
            j = i / ITEMS_WIDTH;
            k = i % ITEMS_WIDTH;
            currentRect = (new Rect (_offset.x + k * (ICON_WIDTH_HEIGHT + ITEM_SPACING), _offset.y + j * (ICON_WIDTH_HEIGHT + ITEM_SPACING), ICON_WIDTH_HEIGHT, ICON_WIDTH_HEIGHT));
            if (currentInventoryItem == null) {
                    GUI.DrawTexture (currentRect, _emptySlot);
            } else {
                // Debug.Log("about to draw texture for " + currentInventoryItem.iconTexture + ", currentRect = " + currentRect);
                GUI.Box (new Rect (currentRect.x, currentRect.y, ICON_WIDTH_HEIGHT, ITEM_NAME_HEIGHT), currentInventoryItem.itemName);
                GUI.DrawTexture (new Rect (currentRect.x, currentRect.y + ITEM_NAME_HEIGHT, currentRect.width, currentRect.height), currentInventoryItem.iconTexture);
                Rect controlBtnRect = new Rect (currentRect.x, (currentRect.y + ICON_WIDTH_HEIGHT + 5 + ITEM_NAME_HEIGHT), ICON_WIDTH_HEIGHT / 2, 20);
                if (GUI.Button (controlBtnRect, "Detail")) {
                    _detailInventoryItem = currentInventoryItem as CollectableItem;
                    this.showInventory = false;
                    this.showDetail = true;
                }

                GUI.enabled = currentInventoryItem.isEquipable;
                if (!currentInventoryItem.isEquipped) {
                        if (GUI.Button (new Rect (controlBtnRect.x + (ICON_WIDTH_HEIGHT / 2), controlBtnRect.y, controlBtnRect.width, controlBtnRect.height), "Equip")) {
                            _equipAndClose (currentInventoryItem.name);
                        }
                } else {
                        if (GUI.Button (new Rect (controlBtnRect.x + (ICON_WIDTH_HEIGHT / 2), controlBtnRect.y, controlBtnRect.width, controlBtnRect.height), "Store")) {
                            _equipAndClose (currentInventoryItem.name);
                        }
                }
                GUI.enabled = true;
                if (currentInventoryItem.isDroppable) {
                    if(!currentInventoryItem.isEquipped) {
                        GUI.enabled = false;
                    }
                    if (GUI.Button (new Rect (currentRect.x, (currentRect.y + ICON_WIDTH_HEIGHT + 25 + ITEM_NAME_HEIGHT), ICON_WIDTH_HEIGHT, 20), "Drop")) {
                        _dropAndClose(currentInventoryItem.name);
                    }

                }
                GUI.enabled = true;
            }
            i++;
        }
    }
Пример #38
0
 private static CollectableItem ItemGetEnum(CollectableItem selected, int i)
 {
     switch (i)
       {
     case (int)CollectableItem.Antibiotics: selected = CollectableItem.Antibiotics; break;
     case (int)CollectableItem.BirthingKit: selected = CollectableItem.BirthingKit; break;
     case (int)CollectableItem.Chicken: selected = CollectableItem.Chicken; break;
     case (int)CollectableItem.ChlorineTablets: selected = CollectableItem.ChlorineTablets; break;
     case (int)CollectableItem.FamilyPlanningBrochure: selected = CollectableItem.FamilyPlanningBrochure; break;
     case (int)CollectableItem.PacketOfSeeds: selected = CollectableItem.PacketOfSeeds; break;
     case (int)CollectableItem.PenAndNotebook: selected = CollectableItem.PenAndNotebook; break;
     case (int)CollectableItem.Sandals: selected = CollectableItem.Sandals; break;
     case (int)CollectableItem.Vaccine: selected = CollectableItem.Vaccine; break;
     case (int)CollectableItem.WateringCan: selected = CollectableItem.WateringCan; break;
       }
       return selected;
 }
Пример #39
0
 public void ResetSelections()
 {
     ItemHighlight = CollectableItem.NULL;
       SelectedItem = CollectableItem.NULL;
       PeopleHighlight = Person.NULL;
       SelectedPerson = Person.NULL;
 }
	public void ItemCollected(CollectableItem item)
	{
		itemsCollected.Add(item.ItemOrder);
		OpenDoor ();
	}
Пример #41
0
 private void PickUpCollectable(CollectableItem collectableItem)
 {
     if (Time.time - lastTimeTossed > 2f)
     {
         collectableItem.Take();
         currCollectable = collectableItem;
         currCollectable.transform.parent = ItemAnchor;
         currCollectable.transform.position = ItemAnchor.position;
         currCollectable.transform.rotation = ItemAnchor.rotation;
         myPathfinder.speed = SlowSpeed;  // character slows down when holding item
     }
 }
Пример #42
0
 public override void OnPickupItem(CollectableItem item)
 {
     appliedEffect = item.effect;
     appliedEffect.StartDurationCountDown();
 }
Пример #43
0
	void Steal (CollectableItem item)
	{
		//		item.transform.parent = null;
		item.Reset();
	}