public override void Execute(MonoBehaviour _behaviour) { Assert.IsNotNull(Text, "Please set a Text component"); int value = Value.GetValue(); Text.text = value.ToString(); }
private void ComputeScore() { int height = Mathf.CeilToInt(MaxHeight.GetValue()); int numSparks = SparksCollected.GetValue(); int score = height + numSparks; Score.SetValue(score); }
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; } }
private void Awake() { samples = new Vector3[samplesCount.GetValue()]; }
public override void Execute(MonoBehaviour _behaviour) { Assert.IsNotNull(Variable, "Please set a Variable!"); Variable.SetValue(Value.GetValue()); }
public int GetDamage() { return(m_Damage.GetValue()); }