Пример #1
0
    void Start()
    {
        BjjPlayer player1script = (BjjPlayer)Player1.GetComponent <BjjPlayer>();
        BjjPlayer player2script = (BjjPlayer)Player2.GetComponent <BjjPlayer>();

        player1script.Opponent     = Player2;
        player1script.PlayerNumber = 1;
        player2script.PlayerNumber = 2;
        player2script.Opponent     = Player1;

        player1script.SetState(BjjState.PullingGuard);
        player2script.SetState(BjjState.EnteringGuard);
    }
    public MovementManager(BjjPlayer bjjPlayer) //TODO: really we should be passing a subclass of BjjPlayer here
    {
        _player = bjjPlayer;
        _ik     = _player.GetComponentInChildren <FullBodyBipedIK>();
        _is     = _player.GetComponentInChildren <InteractionSystem>();
        _ik.Disable();

        leftHand      = new BodyPoint(SearchHierarchyForBone(_player.transform, "L Wrist").gameObject, FullBodyBipedEffector.LeftHand);
        rightHand     = new BodyPoint(SearchHierarchyForBone(_player.transform, "R Hand GP").gameObject, FullBodyBipedEffector.RightHand);
        leftFoot      = new BodyPoint(null, FullBodyBipedEffector.LeftFoot);
        rightFoot     = new BodyPoint(null, FullBodyBipedEffector.RightFoot);
        leftThigh     = new BodyPoint(null, FullBodyBipedEffector.LeftThigh);
        rightThigh    = new BodyPoint(null, FullBodyBipedEffector.RightThigh);
        leftShoulder  = new BodyPoint(null, FullBodyBipedEffector.LeftShoulder);
        rightShoulder = new BodyPoint(null, FullBodyBipedEffector.RightShoulder);
        body          = new BodyPoint(null, FullBodyBipedEffector.Body);

        BodyPoints = new List <BodyPoint> {
            leftHand, rightHand, leftFoot, rightFoot, leftThigh, rightThigh, leftShoulder, rightShoulder, body
        };
    }
Пример #3
0
 public IdleState(BjjPlayer bjjPlayer, Dictionary <BjjState, State> subStates) : base(bjjPlayer, subStates)
 {
 }
 public PullGuardState(BjjPlayer bjjPlayer, Dictionary <BjjState, State> subStates) : base(bjjPlayer, subStates)
 {
 }
 public GrabbingState(BjjPlayer bjjPlayer, Dictionary <BjjState, State> subStates) : base(bjjPlayer, subStates)
 {
 }
Пример #6
0
 public State(BjjPlayer bjjPlayer, Dictionary <BjjState, State> subStates)
 {
     _bjjPlayer = bjjPlayer;
     _subStates = subStates;
     _input     = bjjPlayer.InputBinding;
 }
 public BjjMovementManager(BjjPlayer player) : base(player)
 {
 }