Пример #1
0
 // Update is called once per frame
 void Update()
 {
     MvmentAI.moveVertical(vertical);
     MvmentAI.moveHorizontal(rotation);
     foreach (TurrentMoveAI T in TurrentAI) //I do this because the AI tank has different layers of turrent depending on the distance of the camera. So I move every layer
     {
         T.rotate(turrentRotate);
     }
     foreach (BarrelMoveAI B in BarrelAI) //Read comment above this comment. Same for barrel
     {
         B.rotate(barrelRotate);
     }
 }