void Start() { //zDistanceCurrent = zDistance; //player = GameObject.FindGameObjectWithTag("Hero").GetComponent<IPlayerMovable>(); MonoBehaviour[] list = FindObjectsOfType<MonoBehaviour>(); foreach (MonoBehaviour mb in list) { if (mb is IPlayerMovable) player = mb as IPlayerMovable; } //player = FindObjectOfType(typeof(IPlayerMovable)) as IPlayerMovable; two5d = player.GetMovementStats().twoFiveD; target = player.GetGameObject(); inputController = FindObjectOfType<InputController>(); cam = GetComponent<Camera>(); currentXdistance = xDistance; currentYdistance = yDistance; currentZdistance = zDistance; playerInput = Rewired.ReInput.players.GetPlayer(0); }
void Awake() { anim = GetComponent<Animator>(); playerMoveControllerScript = GetComponent<IPlayerMovable>(); mainCam = GameObject.FindGameObjectWithTag("MainCamera").GetComponent<Camera>(); }
void Start() { player = Rewired.ReInput.players.GetPlayer(playerId); playerMoveController = GetComponent<IPlayerMovable>(); playerJump = GetComponent<IPlayerJump>(); playerRightTriggerAction = GetComponent<PlayerRightTriggerAction>(); //playerSwinging = GetComponent<SwingingWeapon>(); //playerWallJump = GetComponent<WallJump>(); //playerCamera = FindObjectOfType<Camera>().GetComponent<PlayerCamera>(); }
void Start () { anim = GetComponent<Animator> (); playerMoveControllerScript = GetComponent<IPlayerMovable>(); }