void Awake()
 {
     playerInputs           = GetComponent <IInputManager>();
     rb                     = GetComponent <Rigidbody>();
     anim                   = GetComponent <Animator>();
     gameManager            = FindObjectOfType <PR_GameManager>();
     boxCollider            = GetComponent <BoxCollider>();
     initialBoxColliderSize = boxCollider.size;
     slidingBoxColliderSize = new Vector3(initialBoxColliderSize.x, initialBoxColliderSize.y / 2f, initialBoxColliderSize.z);
 }
예제 #2
0
    // Start is called before the first frame update
    void Start()
    {
        gameManager = FindObjectOfType <PR_GameManager>();
        var a = FindObjectsOfType <Object>().OfType <IGameManagement>();

        print(a);
        objectsAttachedToGameManagement = a.ToArray();
        print("printe");
        //if (Player == null)
        //    Player = FindObjectOfType<PlayerController>();
        onStart();
    }
예제 #3
0
 // Start is called before the first frame update
 void Start()
 {
     if (gameManager == null)
     {
         gameManager = FindObjectOfType <PR_GameManager>();
     }
     startingPos = transform.position;
     rb          = GetComponent <Rigidbody>();
     anim        = GetComponent <Animator>();
     xRef        = Animator.StringToHash("X");
     yRef        = Animator.StringToHash("Y");
     zRef        = Animator.StringToHash("Z");
     jumpRef     = Animator.StringToHash("Jump");
     anim.SetFloat(yRef, 1);
 }
예제 #4
0
 void Start()
 {
     gameManager = FindObjectOfType <PR_GameManager>();
     cam         = Camera.main;
     Clear();
 }