//Get references to all necessary components; void Awake() { mover = GetComponent <Mover>(); tr = transform; //characterInput = GetComponent<CharacterInput>(); ceilingDetector = GetComponent <CeilingDetector>(); //if(characterInput == null) //Debug.LogWarning("No character input script has been attached to this gameobject", this.gameObject); Setup(); }
void Start() { //References input = GetComponent <PlayerInput>(); movement = GetComponent <PlayerMovement>(); groundDetector = GetComponentInChildren <GroundDetector>(); ceilingDetector = GetComponentInChildren <CeilingDetector>(); wallrunDetector = GetComponentInChildren <WallrunDetector>(); frontDetector = GetComponentInChildren <FrontDetector>(); coll = GetComponent <CapsuleCollider>(); rb = GetComponent <Rigidbody>(); camController = GetComponent <CameraController>(); cam = Camera.main; status = Status.walking; InitialAbilityCharge(); }
void Awake() { mover = GetComponent <Mover>(); rb = GetComponent <Rigidbody>(); ceilingDetector = GetComponent <CeilingDetector>(); rb.freezeRotation = true; rb.useGravity = false; rb.freezeRotation = true; inputMaster = new InputMaster(); characterInput = FindObjectOfType <PlayerKeyboardInput>(); playerController = GetComponent <PlayerController>(); animator = GetComponent <Animator>(); cameraTransform = Camera.main.transform; GetComponent <PlayerNamePlate>().Instantiate(); }
//Get references to all necessary components; void Awake() { mover = GetComponent <Mover>(); tr = transform; if (Manager.instance.GlobalUsePad) { characterInput = GetComponent <CharacterPadInput>(); } else if (!Manager.instance.GlobalUsePad) { characterInput = GetComponent <CharacterPadInput>(); } ceilingDetector = GetComponent <CeilingDetector>(); if (characterInput == null) { Debug.LogWarning("No character input script has been attached to this gameobject", this.gameObject); } Setup(); }