public override void Execute(MonoBehaviour _behaviour)
        {
            Assert.IsNotNull(Text, "Please set a Text component");

            int value = Value.GetValue();

            Text.text = value.ToString();
        }
Esempio n. 2
0
        private void ComputeScore()
        {
            int height    = Mathf.CeilToInt(MaxHeight.GetValue());
            int numSparks = SparksCollected.GetValue();

            int score = height + numSparks;

            Score.SetValue(score);
        }
Esempio n. 3
0
        private void SetupSegments()
        {
            var levels     = AllSegments.GetValue().Levels;
            int numLevels  = levels.Length;
            int difficulty = CurrentDifficulty.GetValue();

            if (difficulty > m_CurrentLevel && difficulty <= numLevels)
            {
                var currentSegments = SegmentsForNow.GetValue().Items;
                var newSegments     = levels[difficulty - 1].GetValue().Items;

                var newItems = new GameObject[currentSegments.Length + newSegments.Length];
                currentSegments.CopyTo(newItems, 0);
                newSegments.CopyTo(newItems, currentSegments.Length);

                SegmentsForNow.GetValue().Items = newItems;
                SegmentsForNow.SetValue(SegmentsForNow.GetValue());

                m_CurrentLevel = difficulty;
            }
        }
Esempio n. 4
0
 private void Awake()
 {
     samples = new Vector3[samplesCount.GetValue()];
 }
Esempio n. 5
0
        public override void Execute(MonoBehaviour _behaviour)
        {
            Assert.IsNotNull(Variable, "Please set a Variable!");

            Variable.SetValue(Value.GetValue());
        }
Esempio n. 6
0
 public int GetDamage()
 {
     return(m_Damage.GetValue());
 }