Exemplo n.º 1
0
 protected Node UnlockRear(SmartCharacter user)
 {
     return new Sequence(
         user.ST_StandAtWaypoint(this.UnlockWaypointRear),
         user.Node_Icon("key"),
         user.Node_PlayHandGesture("EnterCode", 3200),
         user.Node_Icon(null),
         this.Node_Icon(null),
         this.Node_Set(StateName.IsUnlocked));
 }
Exemplo n.º 2
0
 public static Node Distract(SmartCharacter distractor, SmartCharacter target)
 {
     return new Sequence
     (
         distractor.Node_Icon("speaking"),
         distractor.Behavior.ST_PlayHandGesture("callover", 3000),
         target.Node_GoToUpToRadius(Val.V(() => distractor.transform.position), 4.0f),
         new LeafAffordance("Talk", target, distractor),
         distractor.Node_Icon(null)
     );
 }
Exemplo n.º 3
0
    private static Node Coerce(
        SmartCharacter aggressor,
        SmartCharacter target,
        Val<float> distance)
    {
        return new Sequence(
            aggressor.Node_GoToUpToRadius(Val.V(() => target.transform.position), distance),
            aggressor.Node_OrientTowards(Val.V(() => target.transform.position)),
            aggressor.Node_Icon("stickup"),
            new SequenceParallel(
                aggressor.Behavior.ST_PlayHandGesture("pistolaim", 4000),
                new Sequence(
                    new LeafWait(2000),
                    target.Node_OrientTowards(Val.V(() => aggressor.transform.position)))));

    }
Exemplo n.º 4
0
 protected Node GiveKey(SmartCharacter user)
 {
     return new Sequence(
         user.Node_Require(StateName.RoleActor, StateName.HasKeys, StateName.IsStanding,
             ~StateName.IsIncapacitated),
         this.Node_Require(StateName.RoleActor, ~StateName.HasKeys, StateName.IsStanding,
             ~StateName.IsIncapacitated),
         user.Node_Icon("key"),
         new LeafWait(2000),
         user.Node_Icon(null),
         this.Node_Icon("key"),
         new LeafWait(2000),
         this.Node_Icon(null),
         user.Node_Set(~StateName.HasKeys),
         this.Node_Set(StateName.HasKeys));
 }
Exemplo n.º 5
0
 protected Node Coerce(SmartCharacter user)
 {
     return new Sequence(
         // user.Node_Require(StateName.RoleActor, StateName.HoldingWeapon, StateName.IsStanding,
             // ~StateName.IsIncapacitated),
         // this.Node_Require(StateName.RoleActor, StateName.IsStanding, ~StateName.IsIncapacitated),
         new DecoratorForceStatus(
             RunStatus.Success,
             new Sequence(
                 new LeafAssert(() => WaypointFront == null),
                 this.ST_DoApproach(user, 1.0f))),
         new DecoratorForceStatus(
             RunStatus.Success,
             new Sequence(
                 new LeafAssert(() => WaypointFront != null),
                 user.Node_GoTo(Val.V(() => WaypointFront.position)),
                 user.Node_OrientTowards(this.transform.position),
                 this.Node_OrientTowards(Val.V(() => user.transform.position)))),
         //this.ST_DoApproach(user, 1.0f),
         user.Node_Icon("exclamation"),
         new LeafWait(2000),
         user.Node_Icon(null));
 }
Exemplo n.º 6
0
 protected Node TalkAngrily(SmartCharacter user)
 {
     return new Sequence(
         user.Node_Require(StateName.RoleActor, StateName.IsStanding, ~StateName.IsIncapacitated),
         this.Node_Require(StateName.RoleActor, StateName.IsStanding, ~StateName.IsIncapacitated),
         new LeafAssert(() => user != this), // Not reflexive
         this.ST_Talk(user),
         new SequenceParallel(
             this.Node_Icon("sad"),
             user.Node_Icon("sad")),
         new LeafWait(1500),
         new SequenceParallel(
             this.Node_Icon(null),
             user.Node_Icon(null))
     );
 }
Exemplo n.º 7
0
 protected Node GetKeyIncapacitated(SmartCharacter user)
 {
     return new Sequence(
         user.ST_StandAtWaypoint(this.WaypointPickupKey),
         user.Node_StartInteraction(FullBodyBipedEffector.LeftHand, this.InteractionGetKeyIncapacitated),
         new LeafWait(1000),
         user.Node_Icon("key"),
         user.Node_StopInteraction(FullBodyBipedEffector.LeftHand),
         new LeafWait(1000),
         user.Node_Set(StateName.HasKeys),
         this.Node_Set(~StateName.HasKeys),
         user.Node_Icon(null));
 }
Exemplo n.º 8
0
 protected Node CoerceGiveKey(SmartCharacter user)
 {
     return new Sequence(
         //user.ST_StandAtWaypoint(this.WaypointFront),
         user.Node_Icon("key"),
         this.Node_StartInteraction(FullBodyBipedEffector.LeftHand, this.InteractionCoerceKeyTake),
         new LeafWait(1000),
         user.Node_StartInteraction(FullBodyBipedEffector.RightHand, this.InteractionCoerceKeyGive),
         new LeafWait(1000),
         user.Node_Icon(null),
         this.Node_Icon("key"),
         this.Node_StopInteraction(FullBodyBipedEffector.LeftHand),
         new LeafWait(300),
         user.Node_StopInteraction(FullBodyBipedEffector.RightHand),
         new LeafWait(700),
         this.Node_Icon(null));
 }
Exemplo n.º 9
0
 private static Node BeginCoerce(
     SmartCharacter coercer,
     SmartCharacter target)
 {
     return new Sequence(
         coercer.Node_OrientTowards(Val.V(() => target.transform.position)),
         coercer.Node_Icon("shouting"),
         new LeafInvoke(() => coercer.trackTarget = target.transform),
         new LeafAffordance("RaiseGun", coercer, coercer),
         target.Node_OrientTowards(Val.V(() => coercer.transform.position)),
         new LeafWait(2000),
         coercer.Node_Icon(null));
 }