示例#1
0
 public override void CollectItem()
 {
     if (health != null)
     {
         PlayerStatistics.GetInstance().ModifyHealth(health.value);
     }
 }
示例#2
0
    public override void CollectItem()
    {
        Item originalItem  = ItemManager.GetInstance().FindItem(itemUuid);
        Item collectedItem = new Item(originalItem);

        collectedItem.amount = amount;
        PlayerStatistics.GetInstance().ModifyItem(collectedItem);
    }
    public override void CollectItem()
    {
        PlayerStatistics.GetInstance().ModifyPoints(points.value);

        if (collectableNumberEffect != null)
        {
            GameObject     effect     = InstantiateEffect(collectableNumberEffect);
            ShowSimpleText simpelText = effect.GetComponentInChildren <ShowSimpleText>();
            if (simpelText != null)
            {
                simpelText.text = "+" + points.value;
            }
        }
    }
 public bool Unlockable() {
     PlayerStatistics ps = PlayerStatistics.GetInstance();
     if (ps) {
         if (lockedKey == CollectableKeys.KEY_TYPE.CIRCLE && ps.hasCircleKey) {
             return true;
         }
         if (lockedKey == CollectableKeys.KEY_TYPE.SQUARE && ps.hasSquareKey) {
             return true;
         }
         if (lockedKey == CollectableKeys.KEY_TYPE.TRIANGLE && ps.hasTriangleKey) {
             return true;
         }
     }
     return false;
 }
 public override void CollectItem()
 {
     PlayerStatistics.GetInstance().ModifyKeys(keyType, true);
 }