protected Node FillOutForm(SmartCharacter user) { Vector3 oldPosition = new Vector3(); return new Sequence( user.Node_Require(StateName.RoleActor, StateName.IsStanding, ~StateName.IsIncapacitated, ~StateName.RightHandOccupied), this.Node_Require(StateName.RoleTable, ~StateName.HoldingBall, ~StateName.HoldingWallet), new LeafInvoke(() => oldPosition = user.transform.position), new Race( new Sequence( new LeafWait(15000), new LeafInvoke(() => RunStatus.Failure)), user.ST_StandAtWaypoint(this.StandPoint)), user.Node_NudgeTo(Val.V(() => this.StandPoint.position)), new LeafInvoke(() => user.transform.rotation = this.StandPoint.rotation), new LeafInvoke(() => user.HoldPropRightHand.Attach(user.HoldPropHidden.Release())), new LeafInvoke(() => user.GetRightProp().FadeIn()), user.Node_StartInteraction(FullBodyBipedEffector.RightHand, this.PropPickup), user.Node_WaitForTrigger(FullBodyBipedEffector.RightHand), new LeafInvoke(() => this.PropHolder.Attach(user.HoldPropRightHand.Release())), user.Node_StopInteraction(FullBodyBipedEffector.RightHand), user.Behavior.ST_PlayHandGesture("writing", 6000), user.Node_StartInteraction(FullBodyBipedEffector.RightHand, this.PropPickup), user.Node_WaitForTrigger(FullBodyBipedEffector.RightHand), new LeafInvoke(() => user.HoldPropRightHand.Attach(this.PropHolder.Release())), user.Node_StopInteraction(FullBodyBipedEffector.RightHand), new LeafWait(500), new LeafInvoke(() => user.GetRightProp().FadeOut()), new LeafWait(500), new LeafInvoke(() => user.HoldPropHidden.Attach(user.HoldPropRightHand.Release())), user.Node_GoTo(Val.V(() => oldPosition))); }
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)); }
protected Node DropDrink(SmartCharacter user) { Prop toDestroy = null; return new Sequence( this.Node_Require(StateName.RoleTrashcan), user.Node_Require(StateName.RoleActor, StateName.IsStanding, StateName.HoldingDrink, StateName.RightHandOccupied), new LeafInvoke(() => toDestroy = user.HoldPropRightHand.CurrentProp), user.ST_StandAtWaypoint(this.StandPoint), user.ST_DropAndDestroy(DropTrash), user.Node_Set(~StateName.HoldingDrink, ~StateName.RightHandOccupied)); }
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()); }
public Node Sit(SmartCharacter user) { return new Sequence( user.Node_Require(StateName.RoleActor, StateName.IsStanding, ~StateName.IsIncapacitated), this.Node_Require(StateName.RoleChair, ~StateName.IsOccupied), this.Node_Set(StateName.IsOccupied), new Race( new Sequence( new LeafWait(15000), new LeafInvoke(() => RunStatus.Failure)), user.ST_StandAtWaypoint(this.standPoint)), user.Node_NudgeTo(Val.V(() => this.standPoint.position)), new LeafInvoke(() => user.transform.rotation = this.standPoint.rotation), user.Node_Set(~StateName.IsStanding), user.Node_Set(this.Id, RelationName.IsSittingOn), new LeafInvoke(() => user.Character.SitDown()), new LeafWait(1000), new LeafInvoke(() => user.Character.NavOrientBehavior(OrientationBehavior.LookForward))); }
protected Node PickupMoney(SmartCharacter user) { return new Sequence( user.ST_StandAtWaypoint(this.ApproachWaypoint), user.Node_StartInteraction(FullBodyBipedEffector.RightHand, this.InteractionReachOut), user.Node_StartInteraction(FullBodyBipedEffector.LeftHand, this.InteractionReachOut), new LeafWait(800), user.Node_StartInteraction(FullBodyBipedEffector.RightHand, this.InteractionReachIn), new LeafWait(300), new LeafInvoke(() => this.FadeOut()), new LeafInvoke(() => user.Backpack.FadeIn()), new LeafWait(500), new LeafInvoke(() => this.PlayParticles()), user.Node_StartInteraction(FullBodyBipedEffector.LeftHand, this.InteractionReachIn), new LeafWait(800), user.Node_StopInteraction(FullBodyBipedEffector.LeftHand), user.Node_StopInteraction(FullBodyBipedEffector.RightHand), this.Node_Set(~StateName.HasBackpack), user.Node_Set(StateName.HasBackpack), new LeafWait(500)); }
private Node ST_DoApproach(SmartCharacter user, float distance) { return new Sequence(user.ST_StandAtWaypoint(this.WaypointFront)); }
protected Node GetGunIncapacitated(SmartCharacter user) { return new Sequence( user.ST_StandAtWaypoint(this.WaypointPickupGun), user.Node_StartInteraction(FullBodyBipedEffector.RightHand, this.InteractionGetGunIncapacitated), new LeafWait(500), new LeafInvoke(() => this.GetRightProp().FadeOut()), new LeafWait(500), new LeafInvoke(() => user.HoldPropRightHand.Attach(this.HoldPropRightHand.Release())), new LeafInvoke(() => user.GetRightProp().FadeIn()), user.Node_StopInteraction(FullBodyBipedEffector.RightHand), this.Node_Set(~StateName.RightHandOccupied, ~StateName.HoldingWeapon), user.Node_Set(StateName.RightHandOccupied, StateName.HoldingWeapon), new LeafWait(1000)); }
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)); }