示例#1
0
 public override void OnTrigger(TriggerEnum trigger, TriggerData data, BranchComponent component)
 {
     if (data.Rand.NextDouble() * (_branchProbability / component.BranchBooster) < 1.0)
     {
         //Console.WriteLine("\t\tBranching...");
         component.Branches++;
     }//else
      //Console.WriteLine("\t\tNot branching...");
 }
示例#2
0
 public TreeEntity(string name, ulong age = 0, byte branches = 0, double branchBooster = 1)
 {
     Name            = name;
     AgeComponent    = new AgeComponent(age);
     BranchComponent = new BranchComponent(branches, branchBooster);
 }