Example #1
0
 public Metadata()
 {
     level_id    = 0;
     level_title = "level title";
     goal_string = "goal string";
     goal_struct = new GoalCondition();
 }
Example #2
0
 public void Init(GoalCondition condition, int level)
 {
     cond            = condition;
     incompatibleSet = new HashSet <GoalCondition>();
     foreach (var incCond in cond.incompatibleConditions)
     {
         incompatibleSet.Add(incCond);
     }
     requiredAmount = UnityEngine.Random.Range(cond.minRequiredAmount, cond.maxRequiredAmount) + (level > 1 ? (cond.maxRequiredAmount == 0 ? 0 : Mathf.FloorToInt(Mathf.Sqrt(level)))  : 0);
 }