コード例 #1
0
 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");
 }
コード例 #2
0
        private void RotateView()
        {
            if (PlayerRayCast.isMouseLocked())
            {
                return;
            }

            m_MouseLook.LookRotation(transform, m_Camera.transform);
        }
コード例 #3
0
 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>();
 }
コード例 #4
0
ファイル: Player.cs プロジェクト: faint449/IrisRE
 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;
 }