Пример #1
0
 private void CreateInstances()
 {
     if (IsReady())
     {
         _Instances = new GameObject[NumberInstances()];
         Debug.Log($"Noise Move Demo: Created {_Instances.Length} objects to move");
         for (int index = 0; index < _Instances.Length; index++)
         {
             GameObject instance = GameObject.Instantiate(
                 Prefab,
                 UtilFuncs.MakePosition(index, 0, Sizes, NoiseFunction),
                 Quaternion.identity
                 );
             _Instances[index] = instance;
         }
     }
     else
     {
         Debug.LogWarning("Prefab setting still NULL");
     }
 }
Пример #2
0
 public void Execute(int index)
 {
     Positions[index] = UtilFuncs.MakePosition(index, Time, Sizes, NoiseFunction);
 }