コード例 #1
0
 public void ApplyOverrides(Skill overrideFsm)
 {
     SkillVarOverride[] array = this.fsmVarOverrides;
     for (int i = 0; i < array.Length; i++)
     {
         SkillVarOverride fsmVarOverride = array[i];
         fsmVarOverride.Apply(overrideFsm.Variables);
     }
 }
コード例 #2
0
 public void UpdateValues()
 {
     SkillVarOverride[] array = this.fsmVarOverrides;
     for (int i = 0; i < array.Length; i++)
     {
         SkillVarOverride fsmVarOverride = array[i];
         fsmVarOverride.fsmVar.UpdateValue();
     }
 }
コード例 #3
0
 private static SkillVarOverride[] CopyOverrides(SkillTemplateControl source)
 {
     SkillVarOverride[] array = new SkillVarOverride[source.fsmVarOverrides.Length];
     for (int i = 0; i < source.fsmVarOverrides.Length; i++)
     {
         array[i] = new SkillVarOverride(source.fsmVarOverrides[i]);
     }
     return(array);
 }
コード例 #4
0
 public void UpdateOverrides()
 {
     if (this.fsmTemplate != null)
     {
         List <SkillVarOverride> list              = new List <SkillVarOverride>(this.fsmVarOverrides);
         List <SkillVarOverride> list2             = new List <SkillVarOverride>();
         NamedVariable[]         allNamedVariables = this.fsmTemplate.fsm.Variables.GetAllNamedVariables();
         for (int i = 0; i < allNamedVariables.Length; i++)
         {
             NamedVariable namedVariable = allNamedVariables[i];
             if (namedVariable.ShowInInspector)
             {
                 SkillVarOverride fsmVarOverride = list.Find((SkillVarOverride o) => o.variable.Name == namedVariable.Name);
                 list2.Add(fsmVarOverride ?? new SkillVarOverride(namedVariable));
             }
         }
         this.fsmVarOverrides = list2.ToArray();
         return;
     }
     this.fsmVarOverrides = new SkillVarOverride[0];
 }
コード例 #5
0
 public SkillVarOverride(SkillVarOverride source)
 {
     this.variable = new NamedVariable(source.variable.Name);
     this.fsmVar   = new SkillVar(source.fsmVar);
     this.isEdited = source.isEdited;
 }