Пример #1
0
 void Awake()
 {
     VelAcc  = GetComponent <IVelocityAccumulator>();
     Gravity = GetComponent <IGravity>();
     if (Gravity == null)
     {
         throw new UnityException("PlayerJumping requires an IGravity component attached to the same GameObject.");
     }
 }
 void Awake()
 {
     VelAcc          = GetComponent <IVelocityAccumulator>();
     MainCameraTrans = Camera.main.transform;
 }