Пример #1
0
 void SetActiveModel(CashData cashData)
 {
     _activeModelKey = cashData.name;
     if (!_cashModels.ContainsKey(_activeModelKey))
     {
         _cashModels.Add(cashData.name, Instantiate(cashData.model, transform.position, Quaternion.identity, this.transform) as GameObject);
     }
     _cashModels[_activeModelKey].SetActive(true);
 }
Пример #2
0
        public void Initilise(CashData cashData, int amount, Vector3 whereToDrop, CashSource source)
        {
            _source            = source;
            _amount            = amount;
            _timeUntilExpiry   = cashData.expiryTimer;
            transform.position = whereToDrop + _DropOffset;
            _initialPosition   = whereToDrop;

            SetActiveModel(cashData);
            StartListeningForUserClick();
        }