public override bool Run()
        {
            GameObject lookAtTarget = ShowObjectSelectionDialog(Actor);

            if (lookAtTarget == null)
            {
                return(false);
            }

            string poseData = PoseManager.GetCurrentPose(Actor);

            if (poseData == null)
            {
                return(false);
            }

            this.Actor.LookAtManager.EnableLookAts();
            this.Actor.LookAtManager.SetLookAt(LookAtManager.Type.Interaction, lookAtTarget, 20000, LookAtJointFilter.EyeBones);
            this.Actor.OverlayComponent.UpdateInteractionFreeParts(AwarenessLevel.OverlayUpperbody);
            this.Actor.LookAtManager.DisableLookAts();
            PoseManager.SetCurrentPose(Actor, poseData);
            Target.PlaySoloAnimation(this.Actor.SimDescription.IsHuman, this.Actor, poseData, true, ProductVersion.BaseGame);
            this.Actor.ResetAllAnimation();
            Target.PlaySoloAnimation(this.Actor.SimDescription.IsHuman, this.Actor, poseData, true, ProductVersion.BaseGame);
            this.Actor.ResetAllAnimation();

            this.Actor.WaitForExitReason(3.40282347E+38f, ExitReason.UserCanceled);
            Actor.LookAtManager.EnableLookAts();
            return(true);
        }
            public override bool Test(Sim actor, Sim target, bool isAutonomous, ref Sims3.SimIFace.GreyedOutTooltipCallback greyedOutTooltipCallback)
            {
                if (!PoseManager.IsPoseBoxAvailable())
                {
                    return(false);
                }

                Sim poser = PoseManager.LastPoser;

                if (poser == null)
                {
                    return(false);
                }

                if (PoseManager.LastPoser == target)
                {
                    return(false);
                }

                string poseData = PoseManager.GetCurrentPose(poser);

                if (poseData == null)
                {
                    return(false);
                }
                return(true);
            }
        public override bool Run()
        {
            string posename = PoseManager.GetCurrentPose(Target);

            if (posename != null)
            {
                CmoPoseBox.myList.Remove(posename);
            }
            else
            {
                return(false);
            }
            return(true);
        }
        public override bool Run()
        {
            Sim poser = PoseManager.LastPoser;

            if (poser == null)
            {
                return(false);
            }
            string poseName = PoseManager.GetCurrentPose(poser);

            if (poseName == null)
            {
                return(false);
            }

            return(PoseManager.Pose(Actor, Target, poseName));
        }
            public override bool Test(Sim a, Sim target, bool isAutonomous, ref GreyedOutTooltipCallback greyedOutTooltipCallback)
            {
                Boolean result = false;

                if (PoseManager.IsPosing(target))
                {
                    string posename = PoseManager.GetCurrentPose(target);
                    if (posename != null)
                    {
                        if (CmoPoseBox.myList.Contains(posename))
                        {
                            result = true;
                        }
                    }
                }
                return(result);
            }
Пример #6
0
        public override bool Run()
        {
            List <ObjectListPickerInfo> Entries = ListExpressions();
            string text = (string)ObjectListPickerDialog.Show("Expression", Entries);

            if (text != null && text != "")
            {
                ReactionTypes reaction = (ReactionTypes)Enum.Parse(typeof(ReactionTypes), text);

                Array             reactionTypes = Enum.GetValues(typeof(ReactionTypes));
                CustomOverlayData data          = null;
                CmoPoseBox        box           = PoseManager.FindPoseBox();
                string            poseData      = PoseManager.GetCurrentPose(Actor);
                if (poseData == null)
                {
                    return(false);
                }
                Actor.LookAtManager.DisableLookAts();
                PoseManager.SetCurrentPose(Actor, poseData);
                box.PlaySoloAnimation(Actor.SimDescription.IsHuman, Actor, poseData, true, ProductVersion.BaseGame);
                Actor.ResetAllAnimation();
                Actor.OverlayComponent.UpdateInteractionFreeParts(AwarenessLevel.OverlayFace);//OverlayUpperbody);
                StateMachineClient stateMachineClient = StateMachineClient.Acquire(Actor.ObjectId, "facial_idle", AnimationPriority.kAPDefault, true);
                data = (CustomOverlayData)OverlayComponent.GetOverlayData(reaction, Actor);


                stateMachineClient.UseActorBridgeOrigins = false;
                stateMachineClient.SetActor("x", Actor);
                stateMachineClient.RemoveEventHandler(new SacsEventHandler(Actor.OverlayComponent.InteractionPartLevelCallback));
                stateMachineClient.RemoveEventHandler(new SacsEventHandler(Actor.OverlayComponent.ClearInteractionPartLevelCallback));
                stateMachineClient.EnterState("x", "Enter");
                stateMachineClient.SetProductVersion(data.ProductVersion);
                stateMachineClient.RequestState("x", data.AnimClipName);
                //Actor.OverlayComponent.UpdateInteractionFreeParts(AwarenessLevel.OverlayFace);

                box.PlaySoloAnimation(Actor.SimDescription.IsHuman, Actor, poseData, true, ProductVersion.BaseGame);
                Actor.ResetAllAnimation();

                Actor.WaitForExitReason(3.40282347E+38f, ExitReason.UserCanceled);
                Actor.LookAtManager.EnableLookAts();
                return(true);
            }
            return(false);
        }