private static void H_Lookat_dan_PostLateUpdate(H_Lookat_dan __instance, ChaControl ___male) { if (!inHScene || loadingCharacter || __instance.strPlayMotion == null || ___male == null) { return; } if (resetTamaParticles && !hScene.NowChangeAnim) { CoreGame.ResetParticles(); resetTamaParticles = false; } int maleNum = 0; if (___male.chaID != 99) { if (!twoDans) { return; } maleNum = 1; } CoreGame.LookAtDanUpdate(__instance.transLookAtNull, __instance.strPlayMotion, __instance.bTopStick, hScene.NowChangeAnim, maleNum, __instance.numFemale); }
internal static void H_Lookat_dan_PostLateUpdate(H_Lookat_dan __instance, ChaControl ___male) { if (!inHScene || loadingCharacter || hScene == null || __instance.strPlayMotion == null || ___male == null) { return; } int maleNum = 0; if (__instance.male.chaID != 99) { if (!twoDans) { return; } maleNum = 1; } if (changeAnimation && !hScene.NowChangeAnim && maleNum == 0) { CoreGame.ResetParticles(); CoreGame.SetupFingerColliders(hScene.ctrlFlag.nowAnimationInfo.fileFemale); CoreGame.SetupItemColliders(hScene.ctrlFlag.nowAnimationInfo.fileFemale); changeAnimation = false; } if (maleNum == 0 && _toggleMaleCollidersKey.Value.IsDown()) { CoreGame.ToggleMaleColliders(); } isInScene = __instance.assetName != null && __instance.assetName.Length != 0; CoreGame.LookAtDanUpdate(__instance.transLookAtNull, __instance.strPlayMotion, __instance.bTopStick, hScene.NowChangeAnim, maleNum, __instance.numFemale, twoDans, isInScene); }
private static void SetupNewDanTarget(H_Lookat_dan lookAtDan) { referenceLookAtTarget = danPoints.danEnd; lastDan109Position = danPoints.danEnd.position; lastDanRotation = danPoints.danEnd.rotation; lastDanVector = danPoints.danEnd.position - danPoints.danStart.position; lastDanLength = _dan_length.Value; lastAdjustTime = Time.time; bDanPenetration = false; changingAnimations = false; if (lookAtDan != null && lookAtDan.transLookAtNull != null && lookAtDan.strPlayMotion != null && lookAtDan.transLookAtNull.name != chest_target && lookAtDan.strPlayMotion.Contains("Idle") == false && lookAtDan.strPlayMotion.Contains("OUT") == false && lookAtDan.strPlayMotion.Contains("Drop") == false) { bDanPenetration = true; referenceLookAtTarget = lookAtDan.transLookAtNull; if (referenceLookAtTarget.name == kokan_target) { if (bpKokanTarget != null) { Console.WriteLine("SetupNewDanTarget using BP target"); referenceLookAtTarget = bpKokanTarget; } } } if (danCollider != null) { if (referenceLookAtTarget.name != ana_target && referenceLookAtTarget.name != head_target && referenceLookAtTarget.name != chest_target) { foreach (DynamicBone db in kokanBones) { if (db.m_Colliders.Contains(danCollider)) { Console.WriteLine("Instance of " + danCollider.name + " already exists in list for DB " + db.m_Root.name); } else { db.m_Colliders.Add(danCollider); Console.WriteLine(danCollider.name + " added for bone " + db.m_Root.name); } } } else { foreach (DynamicBone db in kokanBones) { if (db.m_Colliders.Contains(danCollider)) { Console.WriteLine("Removing instance of " + danCollider.name + " in list for DB " + db.m_Root.name); db.m_Colliders.Remove(danCollider); } } } } lastDan101TargetDistance = Vector3.Distance(referenceLookAtTarget.position, danPoints.danStart.position); }
private static void H_Lookat_dan_PostSetInfo(H_Lookat_dan __instance) { if (!inHScene || loadingCharacter || __instance.strPlayMotion == null) { return; } CoreGame.LookAtDanSetup(__instance.transLookAtNull, __instance.strPlayMotion, __instance.bTopStick, 0, 0, false); }
private static void H_Lookat_dan_PostLateUpdate(H_Lookat_dan __instance) { if (!inHScene || loadingCharacter || hScene == null || __instance.strPlayMotion == null) { return; } CoreGame.LookAtDanUpdate(__instance.transLookAtNull, __instance.strPlayMotion, __instance.bTopStick, hScene.NowChangeAnim, 0, 0); }
private static void SetupNewDanTarget(H_Lookat_dan lookAtDan, int maleNum) { referenceLookAtTarget[maleNum] = danPoints[maleNum].danEnd; lastDan109Position[maleNum] = danPoints[maleNum].danEnd.position; lastDanRotation[maleNum] = danPoints[maleNum].danEnd.rotation; lastAdjustTime[maleNum] = Time.time; bDanPenetration[maleNum] = false; changingAnimations[maleNum] = false; if (lookAtDan != null && lookAtDan.transLookAtNull != null && lookAtDan.strPlayMotion != null && lookAtDan.transLookAtNull.name != chest_target && lookAtDan.strPlayMotion.Contains("Idle") == false && lookAtDan.strPlayMotion.Contains("OUT") == false && lookAtDan.strPlayMotion.Contains("Drop") == false) { bDanPenetration[maleNum] = true; referenceLookAtTarget[maleNum] = lookAtDan.transLookAtNull; if (referenceLookAtTarget[maleNum].name == kokan_target) { if (bpKokanTarget[targetF[maleNum]] != null) { Console.WriteLine("SetupNewDanTarget using BP target"); referenceLookAtTarget[maleNum] = bpKokanTarget[targetF[maleNum]]; } } } if (danCollider[maleNum] != null) { if (referenceLookAtTarget[maleNum].name != ana_target && referenceLookAtTarget[maleNum].name != head_target && referenceLookAtTarget[maleNum].name != chest_target) { foreach (DynamicBone db in kokanBones[targetF[maleNum]]) { if (db.m_Colliders.Contains(danCollider[maleNum])) { Console.WriteLine("Instance of " + danCollider[maleNum].name + " already exists in list for DB " + db.m_Root.name); } else { db.m_Colliders.Add(danCollider[maleNum]); Console.WriteLine(danCollider[maleNum].name + " added to " + fem_list[targetF[maleNum]].name + " for bone " + db.m_Root.name); } } } else { foreach (DynamicBone db in kokanBones[targetF[maleNum]]) { if (db.m_Colliders.Contains(danCollider[maleNum])) { Console.WriteLine("Removing instance of " + danCollider[maleNum].name + " in list for DB " + db.m_Root.name); db.m_Colliders.Remove(danCollider[maleNum]); } } } } lastDan101TargetDistance[maleNum] = Vector3.Distance(referenceLookAtTarget[maleNum].position, danPoints[maleNum].danStart.position); }
private static void H_Lookat_dan_PostSetInfo(H_Lookat_dan __instance) { if (loadingCharacter || !inHScene || __instance == null || !bDansFound || !bHPointsFound) { return; } SetupNewDanTarget(__instance); }
private static void H_Lookat_dan_ChangeTarget(H_Lookat_dan __instance) { if (!inHScene || __instance == null || !bDansFound || !bHPointsFound) { return; } SetupNewDanTarget(__instance); SetDanTarget(); }
private static void SetupNewDanTarget(H_Lookat_dan lookAtDan) { referenceLookAtTarget = danPoints.danEnd; lastDan109Position = danPoints.danEnd.position; lastDanRotation = danPoints.danEnd.rotation; lastAdjustTime = Time.time; bDanPenetration = false; changingAnimations = false; if (lookAtDan != null && lookAtDan.transLookAtNull != null && lookAtDan.strPlayMotion != null && lookAtDan.transLookAtNull.name != chest_target && lookAtDan.strPlayMotion.Contains("Idle") == false && lookAtDan.strPlayMotion.Contains("OUT") == false && lookAtDan.strPlayMotion.Contains("Drop") == false) { bDanPenetration = true; referenceLookAtTarget = lookAtDan.transLookAtNull; if (referenceLookAtTarget.name == kokan_target) { if (bpKokanTarget != null) { referenceLookAtTarget = bpKokanTarget; } } } if (danCollider != null) { if (referenceLookAtTarget.name != ana_target && referenceLookAtTarget.name != head_target && referenceLookAtTarget.name != chest_target) { foreach (DynamicBone db in kokanBones) { if (!db.m_Colliders.Contains(danCollider)) { db.m_Colliders.Add(danCollider); } } } else { foreach (DynamicBone db in kokanBones) { if (db.m_Colliders.Contains(danCollider)) { db.m_Colliders.Remove(danCollider); } } } } lastDan101TargetDistance = Vector3.Distance(referenceLookAtTarget.position, danPoints.danStart.position); }
internal static void H_Lookat_dan_PostRelease(H_Lookat_dan __instance) { if (!inHScene || loadingCharacter || __instance.strPlayMotion == null || __instance.male == null) { return; } int maleNum = 0; if (__instance.male.chaID != 99) { maleNum = 1; } CoreGame.LookAtDanRelease(maleNum, __instance.numFemale, false); }
public static void H_Lookat_dan_LateUpdate(H_Lookat_dan __instance) { if (loadingCharacter || !inHScene || !bDansFound || !bHPointsFound) { return; } danPoints.danStart.localScale = new Vector3(_dan_girth.Value, _dan_girth.Value, 1); danPoints.danTop.localScale = new Vector3(_dan_sack_size.Value, _dan_sack_size.Value, _dan_sack_size.Value); if (changingAnimations && !hScene.NowChangeAnim) { SetupNewDanTarget(__instance); } SetDanTarget(); }
private static void SetupNewDanTarget(H_Lookat_dan lookAtDan) { referenceLookAtTarget = danPoints.danEnd; lastDan109Position = danPoints.danEnd.position; lastDanRotation = danPoints.danEnd.rotation; lastDanVector = danPoints.danEnd.position - danPoints.danStart.position; lastDanLength = _dan_length.Value; lastAdjustTime = Time.time; bDanPenetration = false; changingAnimations = false; if (lookAtDan != null && lookAtDan.transLookAtNull != null && lookAtDan.strPlayMotion != null && lookAtDan.transLookAtNull.name != chest_target && lookAtDan.strPlayMotion.Contains("Idle") == false && lookAtDan.strPlayMotion.Contains("OUT") == false) { bDanPenetration = true; referenceLookAtTarget = lookAtDan.transLookAtNull; } lastDan101TargetDistance = Vector3.Distance(referenceLookAtTarget.position, danPoints.danStart.position); }
private static void H_Lookat_dan_ChangeTarget(H_Lookat_dan __instance, System.Text.StringBuilder ___assetName, AIChara.ChaControl ___male) { if (loadingCharacter || !inHScene || __instance == null) { return; } int maleNum = 0; if (___male != null && ___male.chaID != 99) { maleNum = 1; } if (!bDansFound[maleNum]) { return; } b2MAnimation = false; if (___assetName != null && ___assetName.Length != 0 && ___assetName.ToString().Contains("m2f")) { b2MAnimation = true; } if (maleNum == 1 && b2MAnimation == false) { return; } targetF[maleNum] = __instance.numFemale; if (targetF[maleNum] >= constrainPoints.Length) { targetF[maleNum] = 0; } if (!bHPointsFound[targetF[maleNum]]) { return; } SetupNewDanTarget(__instance, maleNum); SetDanTarget(maleNum); }
public static void H_Lookat_dan_LateUpdate(H_Lookat_dan __instance, AIChara.ChaControl ___male) { if (loadingCharacter || !inHScene) { return; } int maleNum = 0; if (___male != null && ___male.chaID != 99) { if (!b2MAnimation) { return; } maleNum = 1; } if (!bDansFound[maleNum]) { return; } danPoints[maleNum].danStart.localScale = new Vector3(_dan_girth[maleNum].Value, _dan_girth[maleNum].Value, 1); danPoints[maleNum].danTop.localScale = new Vector3(_dan_sack_size[maleNum].Value, _dan_sack_size[maleNum].Value, _dan_sack_size[maleNum].Value); if (!bHPointsFound[targetF[maleNum]]) { return; } if (_kokan_adjust.Value && adjustFAnimation && !hScene.NowChangeAnim) { AdjustFemaleAnimation(); } if (changingAnimations[maleNum] && !hScene.NowChangeAnim) { SetupNewDanTarget(__instance, maleNum); } SetDanTarget(maleNum); }
private static void SetupNewDanTarget(H_Lookat_dan lookAtDan) { referenceLookAtTarget = null; bDanPenetration = false; changingAnimations = false; lastDanPostion = new Vector3(0, 0, 0); if (lookAtDan == null || lookAtDan.strPlayMotion == null) { return; } if (lookAtDan.transLookAtNull == null || lookAtDan.transLookAtNull.name == kokan_target) { AddDanColliders(); } else { RemoveDanColliders(); } if (_use_finger_colliders.Value && lookAtDan.transLookAtNull == null) { AddFingerColliders(); } else { RemoveFingerColliders(); } if (lookAtDan.transLookAtNull == null) { return; } referenceLookAtTarget = lookAtDan.transLookAtNull; if (lookAtDan.bTopStick && referenceLookAtTarget.name == kokan_target && !lookAtDan.strPlayMotion.Contains("Idle") && !lookAtDan.strPlayMotion.Contains("Pull") && !lookAtDan.strPlayMotion.Contains("OUT") && bpKokanTarget != null) { referenceLookAtTarget = bpKokanTarget; } bDanPenetration = lookAtDan.bTopStick; }
public static bool LookAtProc(H_Lookat_dan h_Lookat_Dan) { if (Object.op_Equality((Object)h_Lookat_Dan.DanBase.Item1, (Object)null) || Object.op_Equality((Object)h_Lookat_Dan.transLookAtNull, (Object)null)) { return(false); } if (!h_Lookat_Dan.bManual) { ((Transform)h_Lookat_Dan.DanBase.Item2).LookAt(h_Lookat_Dan.transLookAtNull); } else { h_Lookat_Dan.dan_Info.ManualCalc(); } if (h_Lookat_Dan.bTopStick && Object.op_Inequality((Object)h_Lookat_Dan.DanTop, (Object)null)) { h_Lookat_Dan.DanTop.get_transform().set_position(h_Lookat_Dan.transLookAtNull.get_position()); } return(true); }
public static void H_Lookat_dan_LateUpdate(H_Lookat_dan __instance, AIChara.ChaControl ___male) { if (!inHScene) { return; } int maleNum = 0; if (___male != null && ___male.name.Contains("002")) { if (!b2MAnimation) { return; } maleNum = 1; } if (!bDansFound[maleNum]) { return; } danPoints[maleNum].danStart.localScale = new Vector3(_dan_girth[maleNum].Value, _dan_girth[maleNum].Value, 1); danPoints[maleNum].danTop.localScale = new Vector3(_dan_sack_size[maleNum].Value, _dan_sack_size[maleNum].Value, _dan_sack_size[maleNum].Value); if (!bHPointsFound[targetF[maleNum]]) { return; } if (changingAnimations[maleNum] && !hScene.NowChangeAnim) { SetupNewDanTarget(__instance, maleNum); SetDanTarget(maleNum, false); } else { SetDanTarget(maleNum, true); } }
public static void H_Lookat_dan_PostLateUpdate(H_Lookat_dan __instance) { if (loadingCharacter || !inHScene || !bDansFound || !bHPointsFound) { return; } if (_kokan_adjust.Value && adjustFAnimation && !hScene.NowChangeAnim) { AdjustFemaleAnimation(); } if (changingAnimations && !hScene.NowChangeAnim) { SetupNewDanTarget(__instance); } SetDanTarget(); lastDanPostion = danPoints.danEnd.position; }
internal static void H_Lookat_dan_PostLateUpdate(H_Lookat_dan __instance) { if (!inHScene || loadingCharacter || hScene == null || __instance.strPlayMotion == null) { return; } if (changeAnimation && !hScene.NowChangeAnim) { CoreGame.ResetParticles(); CoreGame.SetupFingerColliders(hScene.ctrlFlag.nowAnimationInfo.fileFemale); CoreGame.SetupItemColliders(hScene.ctrlFlag.nowAnimationInfo.fileFemale); changeAnimation = false; } if (_toggleMaleCollidersKey.Value.IsDown()) { CoreGame.ToggleMaleColliders(); } CoreGame.LookAtDanUpdate(__instance.transLookAtNull, __instance.strPlayMotion, __instance.bTopStick, hScene.NowChangeAnim, 0, 0, false, true); }
private static void H_Lookat_dan_PostSetInfo(H_Lookat_dan __instance, System.Text.StringBuilder ___assetName, ChaControl ___male) { if (!inHScene || loadingCharacter || __instance.strPlayMotion == null) { return; } int maleNum = 0; if (___male != null && ___male.chaID != 99) { maleNum = 1; } twoDans = false; if (___assetName != null && ___assetName.Length != 0 && ___assetName.ToString().Contains("m2f")) { twoDans = true; } CoreGame.LookAtDanSetup(__instance.transLookAtNull, __instance.strPlayMotion, __instance.bTopStick, maleNum, __instance.numFemale, twoDans); }
private void LateUpdate() { if (Object.op_Equality((Object)this.male, (Object)null) || this.females == null || (Object.op_Equality((Object)this.male.objBodyBone, (Object)null) || Object.op_Equality((Object)this.females[0].objBodyBone, (Object)null))) { return; } this.setLookAt(); if (this.lstShape != null && Object.op_Inequality((Object)this.transLookAtNull, (Object)null)) { Vector3 vector3_1 = this.transLookAtNull.get_position(); for (int index = 0; index < this.lstShape.Length; ++index) { if (this.lstShape[index].bUse) { float shapeBodyValue = this.females[this.numFemale].GetShapeBodyValue(this.lstShape[index].shape); Vector3 vector3_2 = this.transLookAtNull.TransformDirection((double)shapeBodyValue < 0.5 ? Vector3.Lerp(this.lstShape[index].minPos, this.lstShape[index].middlePos, Mathf.InverseLerp(0.0f, 0.5f, shapeBodyValue)) : Vector3.Lerp(this.lstShape[index].middlePos, this.lstShape[index].maxPos, Mathf.InverseLerp(0.5f, 1f, shapeBodyValue))); vector3_1 = Vector3.op_Addition(vector3_1, vector3_2); } } this.transLookAtNull.set_position(vector3_1); } H_Lookat_dan.LookAtProc(this); }
internal static void H_Lookat_dan_PostSetInfo(H_Lookat_dan __instance) { if (!inHScene || loadingCharacter || __instance.strPlayMotion == null) { return; } int maleNum = 0; if (__instance.male != null && __instance.male.chaID != 99) { maleNum = 1; } twoDans = false; isInScene = __instance.assetName != null && __instance.assetName.Length != 0; if (isInScene && __instance.assetName.ToString().Contains("m2f")) { twoDans = true; } CoreGame.LookAtDanSetup(__instance.transLookAtNull, __instance.strPlayMotion, __instance.bTopStick, maleNum, __instance.numFemale, twoDans, isInScene); }