Exemple #1
0
 protected Node Press(SmartCharacter user)
 {
     return new Sequence(
         user.ST_StandAtWaypoint(StandPoint),
         user.Node_StartInteraction(FullBodyBipedEffector.LeftHand, InteractionPress),
         user.Node_WaitForTrigger(FullBodyBipedEffector.LeftHand),
         new DecoratorLoop(
             10,
             new LeafInvoke(() => PhysicalPress.PhysicalButton.position 
                             += PhysicalPress.PressDirection.normalized * 0.003f)),
         new LeafInvoke(() => this.ButtonTransform.GetComponent<Renderer>().material.color = Color.green),
         new DecoratorLoop(
             10,
             new LeafInvoke(() => PhysicalPress.PhysicalButton.position 
                             -= PhysicalPress.PressDirection.normalized * 0.003f)),
         user.Node_StopInteraction(FullBodyBipedEffector.LeftHand),
         user.Node_HeadLookStop());
 }
Exemple #2
0
 protected Node ST_PlainConverse(
     SmartCharacter user,
     AnimationDescription[] myAnims,
     AnimationDescription[] userAnims) {
     return new Sequence(
             Node_HeadLook(Val.V(() => user.MarkerHead.position)),
             user.Node_HeadLook(Val.V(() => this.MarkerHead.position)),
         ST_PlayConversationAnims(user, myAnims, userAnims),
         Node_HeadLookStop(),
         user.Node_HeadLookStop()
     );
 }
Exemple #3
0
 protected Node ST_ApproachConverse(
     SmartCharacter user,
     AnimationDescription[] myAnims,
     AnimationDescription[] userAnims) {
     return new Sequence(
             Node_GoToUpToRadius(Val.V(() => user.transform.position), 1.3f),
             Node_HeadLook(Val.V(() => user.MarkerHead.position)),
             user.Node_HeadLook(Val.V(() => this.MarkerHead.position)),
             user.Node_HeadLook(Val.V(() => this.MarkerHead.position)),
         ST_PlayConversationAnims(user, myAnims, userAnims),
         Node_HeadLookStop(),
         user.Node_HeadLookStop()
     );
 }
Exemple #4
0
 protected Node ST_Take(SmartCharacter user, StateName holdingState, Node afterTake)
 {
     return new Sequence(
         user.Node_Require(StateName.RoleActor, StateName.IsStanding, ~StateName.HoldingBall, ~StateName.HoldingWallet, ~StateName.IsIncapacitated),
         this.Node_Require(StateName.RoleTable, holdingState),
         user.Node_GoTo(this.StandPoint.position),
         new SequenceParallel(
             user.Node_HeadLook(this.PropPickup.transform.position),
             user.Node_OrientTowards(this.PropPickup.transform.position)),
         new DecoratorCatch(
             () => { user.Character.StopInteraction(FullBodyBipedEffector.RightHand); user.Character.HeadLookStop(); },
             new Sequence(
                user.Node_StartInteraction(FullBodyBipedEffector.RightHand, this.PropPickup),
                user.Node_WaitForTrigger(FullBodyBipedEffector.RightHand),
                new LeafInvoke(() => user.HoldPropRightHand.Attach(this.PropHolder.Release())),
                user.Node_HeadLookStop())),
         this.Node_Set(~holdingState),
         afterTake,
         user.Node_Set(holdingState),
         user.Node_StartInteraction(FullBodyBipedEffector.RightHand, user.InteractionHoldRight),
         user.Node_WaitForTrigger(FullBodyBipedEffector.RightHand),
         new LeafWait(300));
 }