Exemple #1
0
 private void ExecuteCreateFunc(AoeObj aoeObj)
 {
     if (aoeObj.model.onCreateFunc == null || aoeObj.model.onCreateFunc.Count <= 0)
     {
         return;
     }
     for (int i = 0; i < aoeObj.model.onCreateFunc.Count; i++)
     {
         AoeLifeCycleFunc func = aoeObj.model.onCreateFunc[i];
         func.Execute(aoeObj);
     }
 }
Exemple #2
0
 private void ExecuteOnTickFunc(AoeObj aoeObj)
 {
     if (aoeObj.model.tickTime <= 0)
     {
         return;
     }
     if (aoeObj.model.onTickFunc == null || aoeObj.model.onTickFunc.Count <= 0)
     {
         return;
     }
     if (Mathf.RoundToInt(aoeObj.duration * 1000) % Mathf.RoundToInt(aoeObj.model.tickTime * 1000) != 0)
     {
         return;
     }
     for (int i = 0; i < aoeObj.model.onTickFunc.Count; i++)
     {
         AoeLifeCycleFunc func = aoeObj.model.onTickFunc[i];
         func.Execute(aoeObj);
     }
 }