Exemple #1
0
 private void Awake()
 {
     _tiles           = GameObject.Find("Tiles").GetComponentsInChildren <TdTile>();
     InitialHitpoints = new FloatModifiableStat();
     InitialArmor     = new FloatModifiableStat();
     InitialSpeed     = new FloatModifiableStat();
 }
Exemple #2
0
        private void Start()
        {
            ButtonImage.sprite = Spell.PreviewSprite;

            _spellRange = new FloatModifiableStat {
                Value = Spell.Range
            };
            _spellInitialCharge = new FloatModifiableStat {
                Value = Spell.InitialCharge
            };
            _spellChargeTime = new FloatModifiableStat {
                Value = Spell.ChargeTime
            };
            _spellCharges = new FloatModifiableStat {
                Value = Spell.Charges
            };

            ModifierController.ImportModifiers(this);

            _spellData = new CurrentSpellData(ProgressDisplay, AmountDisplay)
            {
                CurrentCharge        = _spellInitialCharge.Value,
                CurrentUsableCharges = Mathf.FloorToInt(_spellInitialCharge.Value),
                ActualChargeTime     = _spellChargeTime.Value,
                ActualMaxCharges     = _spellCharges.Value
            };
        }
Exemple #3
0
 private void OnEnable()
 {
     Range = new FloatModifiableStat {
         Value = Spell.Range
     };
     Particles = GetComponent <ParticleSystem>();
     AdjustParticles();
     HitEnemies();
     StartCoroutine(DestroyItself());
 }
Exemple #4
0
 public CurrentSpellData(UiBaseProgress progressDisplay, UiBaseAmount amountDisplay)
 {
     _progressDisplay = progressDisplay;
     _amountDisplay   = amountDisplay;
     _currentCharge   = new FloatModifiableStat();
 }