コード例 #1
0
        internal static void ClearFingerColliders(DanAgent danAgent, CollisionAgent firstAgent, CollisionAgent secondAgent = null)
        {
            if (firstAgent == null)
            {
                return;
            }

            firstAgent.RemoveFingerColliders(firstAgent);

            if (danAgent != null)
            {
                danAgent.RemoveFingerColliders(firstAgent);
            }

            if (secondAgent == null)
            {
                return;
            }

            firstAgent.RemoveFingerColliders(secondAgent);
            secondAgent.RemoveFingerColliders(firstAgent);

            if (danAgent != null)
            {
                danAgent.RemoveFingerColliders(secondAgent);
            }
        }
コード例 #2
0
        public void InitializeDanAgent()
        {
            ClearDanAgent();

            danEntryChild = Tools.GetTransformOfChaControl(ChaControl, BoneNames.BPDanEntryTarget);
            danEndChild   = Tools.GetTransformOfChaControl(ChaControl, BoneNames.BPDanEndTarget);

            if (danEntryChild == null || danEndChild == null)
            {
                return;
            }

            if (controllerOptions == null)
            {
                controllerOptions = new ControllerOptions(DefaultDanAutoTarget);
            }

            if (danOptions == null)
            {
                danOptions = new DanOptions(DefaultColliderRadiusScale, DefaultColliderLengthScale, DefaultLengthSquish, DefaultGirthSquish, DefaultSquishThreshold, false, 2.0f);
            }

            if (collisionOptions == null)
            {
                collisionOptions = new CollisionOptions(DefaultMaxOralPush, DefaultMaxOralPull, DefaultOralPullRate, DefaultReturnRate, false, 1.0f);
            }

            danAgent        = new DanAgent(ChaControl, danOptions);
            danTargetsValid = true;

            InitializeTama();
        }
コード例 #3
0
        public void ClearDanAgent()
        {
            danTargetsValid = false;

            if (danAgent != null)
            {
                danAgent.ClearDanAgent();
            }

            danAgent = null;
        }
コード例 #4
0
        public void ClearDanAgent()
        {
            danTargetsValid = false;
            danEntryChild   = null;
            danEndChild     = null;

            if (danAgent == null)
            {
                return;
            }

            danAgent.ClearDanAgent();
            danAgent = null;
        }
コード例 #5
0
        internal static void ClearFingerColliders()
        {
            DanAgent danAgent = null;

            if (danAgents != null && danAgents.Count > 0)
            {
                danAgent = danAgents[0];
            }

            CollisionAgent firstAgent  = collisionAgents[0];
            CollisionAgent secondAgent = null;

            if (collisionAgents.Count > 1)
            {
                secondAgent = collisionAgents[1];
            }

            ClearFingerColliders(danAgent, firstAgent, secondAgent);
        }
コード例 #6
0
        public void InitializeDanAgent()
        {
            ClearDanAgent();

            danEntryTarget = ChaControl.GetComponentsInChildren <Transform>().FirstOrDefault(x => x.name != null && x.name.Equals("k_f_dan_entry"));
            danEndTarget   = ChaControl.GetComponentsInChildren <Transform>().FirstOrDefault(x => x.name != null && x.name.Equals("k_f_dan_end"));

            if (danEntryTarget == null || danEndTarget == null)
            {
                return;
            }

            if (danOptions == null)
            {
                danOptions = new DanOptions(DefaultColliderVertical, DefaultColliderRadius, DefaultColliderLength, DefaultLengthSquish, DefaultGirthSquish, DefaultSquishThreshold);
            }

            danAgent        = new DanAgent(ChaControl, danOptions);
            danTargetsValid = true;
        }
コード例 #7
0
        internal static void SetupFingerColliders(string animation)
        {
            DanAgent danAgent = null;

            if (danAgents != null && danAgents.Count > 0)
            {
                danAgent = danAgents[0];
            }

            CollisionAgent firstAgent  = collisionAgents[0];
            CollisionAgent secondAgent = null;

            if (collisionAgents.Count > 1 && collisionAgents[1].m_collisionCharacter.visibleAll && collisionAgents[1].m_collisionCharacter.objTop != null)
            {
                secondAgent = collisionAgents[1];
            }

            ClearFingerColliders(danAgent, firstAgent, secondAgent);
            AddFingerColliders(animation, danAgent, firstAgent, secondAgent);
        }
コード例 #8
0
        internal static void AddFingerColliders(string animation, DanAgent danAgent, CollisionAgent firstAgent, CollisionAgent secondAgent = null)
        {
            if (animation == null || firstAgent == null)
            {
                return;
            }

            if (danAgent != null && BoneNames.maleFingerAnimationNames.Contains(animation))
            {
                danAgent.AddFingerColliders(firstAgent);

                if (secondAgent != null)
                {
                    danAgent.AddFingerColliders(secondAgent);
                }

                return;
            }

            if (BoneNames.femaleSelfFingerAnimationNames.Contains(animation))
            {
                firstAgent.AddFingerColliders(firstAgent);
                return;
            }

            if (secondAgent == null)
            {
                return;
            }

            if (BoneNames.lesbianFingerAnimationNames.Contains(animation))
            {
                firstAgent.AddFingerColliders(secondAgent);
                secondAgent.AddFingerColliders(firstAgent);
                return;
            }
        }