void Awake() { sectionRendering = GameObject.Find("IngameScene").GetComponent <SectionRendering>(); sceneEventSystem = sectionRendering.GetComponent <SceneEventSystem>(); player = sceneEventSystem.Player; playerRayCast = player.GetComponent <PlayerRayCast>(); playerProperty = player.GetComponent <PlayerProperty>(); floorEntrance = GameObject.Find("FloorEntrance"); }
private void RotateView() { if (PlayerRayCast.isMouseLocked()) { return; } m_MouseLook.LookRotation(transform, m_Camera.transform); }
public FSMState(Transform player) { this.player = player; animator = player.GetComponent <Animator>(); ik = player.GetComponent <AimIK>(); playerController = player.GetComponent <PlayerController>(); characterController = player.GetComponent <CharacterController>(); capsuleCollider = player.GetComponent <CapsuleCollider>(); PlayerFsm = player.GetComponent <PlayerFSM>(); playerRotateWithCamera = player.GetComponent <PlayerRotateWithCamera>(); playerRayCast = player.GetComponent <PlayerRayCast>(); PlayerAudioEffect = player.GetComponent <PlayerAudioEffect>(); }
public Player(int ID, int GID, int hp, int atk, float speed, GameObject Player) { Hp = hp; ID = _ID; GID = _GID; Atk = atk; Speed = speed; StateBehavior = new PlayerState(Player); Movebehavior = new PlayerMove(Speed, Player); Jumpbehavior = new PlayerJump(Player); Attackbehavior = new PlayerAttack(Player); OnHitbehavior = new PlayerOnHit(Player); EndActionBehavior = new PlayerEndAction(Player); RayCastBehavior = new PlayerRayCast(); RayCastBehavior.character = this; }