void Awake()
 {
     isGamePlaying = false;
     gameManager   = this;
     objectsAttachedToGameManagement = FindObjectsOfType <UnityEngine.Object>().OfType <IGameManagement>().ToArray();
     if (gameManager == null)
     {
         gameManager = FindObjectOfType <BotSceneGameManager>();
     }
 }
 // Start is called before the first frame update
 void Start()
 {
     inputs = GetComponent <PlayerInputManager>();
     if (gameManager == null)
     {
         gameManager = FindObjectOfType <BotSceneGameManager>();
     }
     rb          = GetComponent <Rigidbody>();
     anim        = GetComponent <Animator>();
     startingPos = transform.position;
 }
Example #3
0
 // Start is called before the first frame update
 void Awake()
 {
     rb          = GetComponent <Rigidbody>();
     anim        = GetComponent <Animator>();
     gameManager = FindObjectOfType <BotSceneGameManager>();
 }