the initial commit to the repo.
This commit is contained in:
parent
025c032b8c
commit
1b757591b9
264 changed files with 21882 additions and 0 deletions
100
EscapeFromTarkovCheat/Features/ESP/ExfiltrationPointsESP.cs
Normal file
100
EscapeFromTarkovCheat/Features/ESP/ExfiltrationPointsESP.cs
Normal file
|
|
@ -0,0 +1,100 @@
|
|||
using System.Collections.Generic;
|
||||
using Comfort.Common;
|
||||
using EFT;
|
||||
using EFT.Interactive;
|
||||
using EscapeFromTarkovCheat.Data;
|
||||
using EscapeFromTarkovCheat.Utils;
|
||||
using JsonType;
|
||||
using UnityEngine;
|
||||
|
||||
namespace EscapeFromTarkovCheat.Feauters.ESP
|
||||
{
|
||||
public class ExfiltrationPointsESP : MonoBehaviour
|
||||
{
|
||||
private List<GameExfiltrationPoint> _gameExfiltrationPoints= new List<GameExfiltrationPoint>();
|
||||
private static readonly float CacheExfiltrationPointInterval = 5f;
|
||||
private float _nextLootItemCacheTime;
|
||||
|
||||
private static readonly Color ExfiltrationPointColour = Color.green;
|
||||
private static readonly Color ClosedExfiltrationPointColour = Color.yellow;
|
||||
|
||||
public void Update()
|
||||
{
|
||||
if (!Settings.DrawExfiltrationPoints)
|
||||
return;
|
||||
|
||||
if (Time.time >= _nextLootItemCacheTime)
|
||||
{
|
||||
if ((Main.GameWorld != null) && (Main.GameWorld.ExfiltrationController.ExfiltrationPoints != null))
|
||||
{
|
||||
_gameExfiltrationPoints.Clear();
|
||||
foreach (var exfiltrationPoint in Main.GameWorld.ExfiltrationController.EligiblePoints(Main.LocalPlayer.Profile))
|
||||
{
|
||||
if (!GameUtils.IsExfiltrationPointValid(exfiltrationPoint))
|
||||
continue;
|
||||
|
||||
_gameExfiltrationPoints.Add(new GameExfiltrationPoint(exfiltrationPoint, true));
|
||||
}
|
||||
|
||||
foreach (var exfiltrationPoint in Main.GameWorld.ExfiltrationController.ExfiltrationPoints)
|
||||
{
|
||||
bool trig = false;
|
||||
if (!GameUtils.IsExfiltrationPointValid(exfiltrationPoint))
|
||||
continue;
|
||||
foreach (var ep in _gameExfiltrationPoints)
|
||||
{
|
||||
if (ep.Name == exfiltrationPoint.Settings.Name.Localized())
|
||||
trig = !trig;
|
||||
continue;
|
||||
}
|
||||
if (trig)
|
||||
continue;
|
||||
_gameExfiltrationPoints.Add(new GameExfiltrationPoint(exfiltrationPoint, false));
|
||||
}
|
||||
|
||||
_nextLootItemCacheTime = (Time.time + CacheExfiltrationPointInterval);
|
||||
}
|
||||
}
|
||||
|
||||
foreach (GameExfiltrationPoint gameExfiltrationPoint in _gameExfiltrationPoints)
|
||||
gameExfiltrationPoint.RecalculateDynamics();
|
||||
|
||||
}
|
||||
private static string GetName(ExfiltrationPoint point, bool isEligible)
|
||||
{
|
||||
var localizedName = point.Settings.Name.Localized();
|
||||
return !isEligible ? localizedName : $"{localizedName} ({GetStatus(point.Status)})";
|
||||
}
|
||||
|
||||
public static string GetStatus(EExfiltrationStatus status)
|
||||
{
|
||||
return status switch
|
||||
{
|
||||
EExfiltrationStatus.AwaitsManualActivation => LocalisationManager.GetString(Settings.Language, StringKey.DATA_EP_ACTIVE),
|
||||
EExfiltrationStatus.Countdown => LocalisationManager.GetString(Settings.Language, StringKey.DATA_EP_TIMER),
|
||||
EExfiltrationStatus.NotPresent => LocalisationManager.GetString(Settings.Language, StringKey.DATA_EP_CLOSED),
|
||||
EExfiltrationStatus.Pending => LocalisationManager.GetString(Settings.Language, StringKey.DATA_EP_PENDING),
|
||||
EExfiltrationStatus.RegularMode => LocalisationManager.GetString(Settings.Language, StringKey.DATA_EP_OPEN),
|
||||
EExfiltrationStatus.UncompleteRequirements => LocalisationManager.GetString(Settings.Language, StringKey.DATA_EP_REQUIREMENT),
|
||||
_ => string.Empty
|
||||
};
|
||||
}
|
||||
|
||||
private void OnGUI()
|
||||
{
|
||||
if (Settings.DrawExfiltrationPoints)
|
||||
{
|
||||
foreach (var exfiltrationPoint in _gameExfiltrationPoints)
|
||||
{
|
||||
if (!GameUtils.IsExfiltrationPointValid(exfiltrationPoint.ExfiltrationPoint) || !exfiltrationPoint.IsOnScreen)
|
||||
continue;
|
||||
|
||||
string exfiltrationPointText = $"{GetName(exfiltrationPoint.ExfiltrationPoint, exfiltrationPoint.Eligible)} [{exfiltrationPoint.FormattedDistance}]";
|
||||
|
||||
Render.DrawString(new Vector2(exfiltrationPoint.ScreenPosition.x - 50f, exfiltrationPoint.ScreenPosition.y), exfiltrationPointText, exfiltrationPoint.Eligible ? ExfiltrationPointColour : ClosedExfiltrationPointColour);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
81
EscapeFromTarkovCheat/Features/ESP/ItemESP.cs
Normal file
81
EscapeFromTarkovCheat/Features/ESP/ItemESP.cs
Normal file
|
|
@ -0,0 +1,81 @@
|
|||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using Comfort.Common;
|
||||
using EFT;
|
||||
using EFT.Interactive;
|
||||
using EscapeFromTarkovCheat.Data;
|
||||
using EscapeFromTarkovCheat.Utils;
|
||||
using JsonType;
|
||||
using UnityEngine;
|
||||
|
||||
namespace EscapeFromTarkovCheat.Feauters.ESP
|
||||
{
|
||||
public class ItemESP : MonoBehaviour
|
||||
{
|
||||
private static readonly float CacheLootItemsInterval = 4f;
|
||||
private float _nextLootItemCacheTime;
|
||||
|
||||
//private static readonly Color SpecialColor = new Color(1f, 0.2f, 0.09f);
|
||||
private static readonly Color QuestColor = Color.yellow;
|
||||
private static readonly Color CommonColor = Color.white;
|
||||
private static readonly Color RareColor = new Color(0.38f, 0.43f, 1f);
|
||||
private static readonly Color SuperRareColor = new Color(1f, 0.29f, 0.36f);
|
||||
|
||||
private List<GameLootItem> _gameLootItems = new List<GameLootItem>();
|
||||
private Stopwatch _stopwatch = new Stopwatch();
|
||||
public void Update()
|
||||
{
|
||||
if (!Settings.DrawLootItems)
|
||||
return;
|
||||
|
||||
if (Time.time >= _nextLootItemCacheTime)
|
||||
{
|
||||
if ((Main.GameWorld != null) && (Main.GameWorld.LootItems != null))
|
||||
{
|
||||
_gameLootItems.Clear();
|
||||
|
||||
for (int i = 0; i < Main.GameWorld.LootItems.Count; i++)
|
||||
{
|
||||
LootItem lootItem = Main.GameWorld.LootItems.GetByIndex(i);
|
||||
|
||||
if (!GameUtils.IsLootItemValid(lootItem) || (Vector3.Distance(Main.MainCamera.transform.position, lootItem.transform.position) > Settings.DrawLootItemsDistance))
|
||||
continue;
|
||||
|
||||
_gameLootItems.Add(new GameLootItem(lootItem));
|
||||
}
|
||||
|
||||
_nextLootItemCacheTime = (Time.time + CacheLootItemsInterval);
|
||||
}
|
||||
}
|
||||
|
||||
foreach (GameLootItem gameLootItem in _gameLootItems)
|
||||
gameLootItem.RecalculateDynamics();
|
||||
|
||||
}
|
||||
|
||||
private void OnGUI()
|
||||
{
|
||||
if (Settings.DrawLootItems)
|
||||
{
|
||||
foreach (var gameLootItem in _gameLootItems)
|
||||
{
|
||||
if (!GameUtils.IsLootItemValid(gameLootItem.LootItem) || !gameLootItem.IsOnScreen || gameLootItem.Distance > Settings.DrawLootItemsDistance)
|
||||
continue;
|
||||
|
||||
string lootItemName = $"{gameLootItem.LootItem.Item.ShortName.Localized()} [{gameLootItem.FormattedDistance}]";
|
||||
|
||||
if (gameLootItem.LootItem.Item.Template.Rarity == ELootRarity.Common)
|
||||
Render.DrawString(new Vector2(gameLootItem.ScreenPosition.x - 50f, gameLootItem.ScreenPosition.y), lootItemName, CommonColor);
|
||||
if (gameLootItem.LootItem.Item.Template.Rarity == ELootRarity.Rare)
|
||||
Render.DrawString(new Vector2(gameLootItem.ScreenPosition.x - 50f, gameLootItem.ScreenPosition.y), lootItemName, RareColor);
|
||||
if (gameLootItem.LootItem.Item.Template.Rarity == ELootRarity.Superrare)
|
||||
Render.DrawString(new Vector2(gameLootItem.ScreenPosition.x - 50f, gameLootItem.ScreenPosition.y), lootItemName, SuperRareColor);
|
||||
if (gameLootItem.LootItem.Item.Template.QuestItem)
|
||||
Render.DrawString(new Vector2(gameLootItem.ScreenPosition.x - 50f, gameLootItem.ScreenPosition.y), lootItemName, QuestColor);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
70
EscapeFromTarkovCheat/Features/ESP/LootableContainerESP.cs
Normal file
70
EscapeFromTarkovCheat/Features/ESP/LootableContainerESP.cs
Normal file
|
|
@ -0,0 +1,70 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Reflection;
|
||||
using Comfort.Common;
|
||||
using EFT;
|
||||
using EFT.Interactive;
|
||||
using EscapeFromTarkovCheat.Data;
|
||||
using EscapeFromTarkovCheat.Utils;
|
||||
using JsonType;
|
||||
using UnityEngine;
|
||||
|
||||
namespace EscapeFromTarkovCheat.Feauters.ESP
|
||||
{
|
||||
public class LootableContainerESP : MonoBehaviour
|
||||
{
|
||||
private static readonly float CacheLootItemsInterval = 100;
|
||||
private float _nextLootContainerCacheTime;
|
||||
private List<GameLootContainer> _gameLootContainers;
|
||||
private static readonly Color LootableContainerColor = new Color(1f, 0.2f, 0.09f);
|
||||
|
||||
public void Start()
|
||||
{
|
||||
_gameLootContainers = new List<GameLootContainer>();
|
||||
}
|
||||
|
||||
public void Update()
|
||||
{
|
||||
if (!Settings.DrawLootableContainers)
|
||||
return;
|
||||
|
||||
if (Time.time >= _nextLootContainerCacheTime)
|
||||
{
|
||||
if ((Main.GameWorld != null) && (Main.GameWorld.LootItems != null))
|
||||
{
|
||||
_gameLootContainers.Clear();
|
||||
|
||||
foreach (LootableContainer lootableContainer in FindObjectsOfType<LootableContainer>())
|
||||
{
|
||||
if (!GameUtils.IsLootableContainerValid(lootableContainer) || (Vector3.Distance(Main.MainCamera.transform.position, lootableContainer.transform.position) > Settings.DrawLootableContainersDistance))
|
||||
continue;
|
||||
|
||||
_gameLootContainers.Add(new GameLootContainer(lootableContainer));
|
||||
}
|
||||
_nextLootContainerCacheTime = (Time.time + CacheLootItemsInterval);
|
||||
}
|
||||
}
|
||||
|
||||
foreach (GameLootContainer gameLootContainer in _gameLootContainers)
|
||||
gameLootContainer.RecalculateDynamics();
|
||||
}
|
||||
|
||||
public void OnGUI()
|
||||
{
|
||||
if (!Settings.DrawLootableContainers)
|
||||
return;
|
||||
|
||||
foreach (var gameLootContainer in _gameLootContainers)
|
||||
{
|
||||
if (!GameUtils.IsLootableContainerValid(gameLootContainer.LootableContainer) || !gameLootContainer.IsOnScreen || gameLootContainer.Distance > Settings.DrawLootableContainersDistance)
|
||||
continue;
|
||||
|
||||
//EFT.InventoryLogic.Item rootItem = gameLootContainer.LootableContainer.ItemOwner.RootItem;
|
||||
//rootItem.Template.Name.Localized();
|
||||
|
||||
string lootItemName = $"{gameLootContainer.LootableContainer.name} [{gameLootContainer.FormattedDistance}]";
|
||||
Render.DrawString(new Vector2(gameLootContainer.ScreenPosition.x - 50f, gameLootContainer.ScreenPosition.y), lootItemName, LootableContainerColor);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
191
EscapeFromTarkovCheat/Features/ESP/PlayerESP.cs
Normal file
191
EscapeFromTarkovCheat/Features/ESP/PlayerESP.cs
Normal file
|
|
@ -0,0 +1,191 @@
|
|||
using EFT;
|
||||
using EscapeFromTarkovCheat.Data;
|
||||
using EscapeFromTarkovCheat.Utils;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
namespace EscapeFromTarkovCheat.Feauters.ESP
|
||||
{
|
||||
public class PlayerESP : MonoBehaviour
|
||||
{
|
||||
private static readonly Color _playerColor = Color.cyan;
|
||||
private static readonly Color _botColor = Color.yellow;
|
||||
private static readonly Color _healthColor = Color.green;
|
||||
private static readonly Color _bossColor = Color.red;
|
||||
private static readonly Color _cultistLeader = Color.red;
|
||||
private static readonly Color _cultistGuard = Color.red;
|
||||
private static readonly Color _guardColor = Color.red;
|
||||
private static readonly Color _skeletonColor = Color.cyan;
|
||||
|
||||
private static readonly HashSet<string> BossNames = new HashSet<string>
|
||||
{
|
||||
"Killa",
|
||||
"Reshala",
|
||||
"Sanitar",
|
||||
"Glukhar",
|
||||
"Shturman",
|
||||
"Tagilla",
|
||||
"Knight",
|
||||
"BirdEye",
|
||||
"Zryachiy",
|
||||
"Big Pipe",
|
||||
"Kaban"
|
||||
};
|
||||
|
||||
// Token: 0x0200001D RID: 29
|
||||
public enum PlayerType
|
||||
{
|
||||
SCAV,
|
||||
PLAYERSCAV,
|
||||
PLAYER,
|
||||
TEAMMATE,
|
||||
FOLLOWER,
|
||||
BOSS
|
||||
}
|
||||
public static bool IsBossByName(string playerName)
|
||||
{
|
||||
return PlayerESP.BossNames.Contains(playerName);
|
||||
}
|
||||
public static string PlayerName(Player player, ref PlayerESP.PlayerType playerType)
|
||||
{
|
||||
if (player.Profile.Info.RegistrationDate > 0)
|
||||
{
|
||||
if (player.Profile.Info.Side == EPlayerSide.Savage)
|
||||
{
|
||||
playerType = PlayerESP.PlayerType.PLAYERSCAV;
|
||||
return "player";
|
||||
}
|
||||
playerType = PlayerESP.PlayerType.PLAYER;
|
||||
return player.Profile.Info.Side.ToString() + " [" + player.Profile.Info.Level.ToString() + "]";
|
||||
}
|
||||
|
||||
if (player.Profile.Info.Settings.Role.ToString().IndexOf("boss") != -1)
|
||||
{
|
||||
playerType = PlayerESP.PlayerType.BOSS;
|
||||
return "BOSS";
|
||||
}
|
||||
|
||||
if (player.Profile.Info.Settings.Role.ToString().IndexOf("follower") != -1)
|
||||
{
|
||||
playerType = PlayerESP.PlayerType.FOLLOWER;
|
||||
return "Follower";
|
||||
}
|
||||
|
||||
if (player.Profile.Info.Settings.Role.ToString().ToLower().IndexOf("pmcbot") != -1)
|
||||
{
|
||||
playerType = PlayerESP.PlayerType.SCAV;
|
||||
return "Raider";
|
||||
}
|
||||
|
||||
playerType = PlayerESP.PlayerType.SCAV;
|
||||
return "";
|
||||
}
|
||||
|
||||
private void DrawPlayerName(GamePlayer gamePlayer, ref Color color)
|
||||
{
|
||||
string text = "";
|
||||
WildSpawnType role = gamePlayer.Player.Profile.Info.Settings.Role;
|
||||
|
||||
if (gamePlayer.IsAI)
|
||||
{
|
||||
text = $"{LocalisationManager.GetString(Settings.Language, StringKey.DATA_PLAYERTYPE_BOT)} [{gamePlayer.FormattedDistance}]";
|
||||
color = PlayerESP._botColor;
|
||||
}
|
||||
else
|
||||
{
|
||||
text = $"{gamePlayer.Player.Profile.Info.Nickname} [{gamePlayer.FormattedDistance}]";
|
||||
color = PlayerESP._playerColor;
|
||||
}
|
||||
|
||||
if (gamePlayer.Player.Profile.Info.Settings.IsFollower())
|
||||
{
|
||||
text = $"{LocalisationManager.GetString(Settings.Language, StringKey.DATA_PLAYERTYPE_GUARD)}-{gamePlayer.Player.Profile.Info.Nickname} [{gamePlayer.FormattedDistance}]";
|
||||
color = PlayerESP._guardColor;
|
||||
}
|
||||
|
||||
if (gamePlayer.Player.Profile.Info.Settings.IsBoss())
|
||||
{
|
||||
switch (role)
|
||||
{
|
||||
case WildSpawnType.sectantPriest:
|
||||
text = $"{gamePlayer.Player.Profile.Info.Nickname} [{gamePlayer.FormattedDistance}]";
|
||||
color = PlayerESP._cultistLeader;
|
||||
break;
|
||||
case WildSpawnType.sectantWarrior:
|
||||
text = $"{gamePlayer.Player.Profile.Info.Nickname} [{gamePlayer.FormattedDistance}]";
|
||||
color = PlayerESP._cultistGuard;
|
||||
break;
|
||||
case WildSpawnType.pmcBEAR:
|
||||
text = $"{LocalisationManager.GetString(Settings.Language, StringKey.DATA_PLAYERTYPE_BEAR)} [{gamePlayer.FormattedDistance}]";
|
||||
color = PlayerESP._playerColor;
|
||||
break;
|
||||
case WildSpawnType.pmcUSEC:
|
||||
text = $"{LocalisationManager.GetString(Settings.Language, StringKey.DATA_PLAYERTYPE_USEC)} [{gamePlayer.FormattedDistance}]";
|
||||
color = PlayerESP._playerColor;
|
||||
break;
|
||||
case WildSpawnType.pmcBot:
|
||||
text = $"{LocalisationManager.GetString(Settings.Language, StringKey.DATA_PLAYERTYPE_PMC)} [{gamePlayer.FormattedDistance}]";
|
||||
color = PlayerESP._playerColor;
|
||||
break;
|
||||
default:
|
||||
text = $"{LocalisationManager.GetString(Settings.Language, StringKey.DATA_PLAYERTYPE_BOSS)}-{gamePlayer.Player.Profile.Info.Nickname} [{gamePlayer.FormattedDistance}]";
|
||||
color = PlayerESP._bossColor;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Vector2 vector = GUI.skin.GetStyle(text).CalcSize(new GUIContent(text));
|
||||
Render.DrawString(new Vector2(gamePlayer.ScreenPosition.x - vector.x / 2f, gamePlayer.HeadScreenPosition.y - 20f), text, color, true);
|
||||
}
|
||||
private void DrawPlayerHealth(GamePlayer gamePlayer, float boxPositionY, float boxHeight, float boxWidth)
|
||||
{
|
||||
if (!gamePlayer.Player.HealthController.IsAlive)
|
||||
return;
|
||||
|
||||
float current = gamePlayer.Player.HealthController.GetBodyPartHealth(EBodyPart.Common, false).Current;
|
||||
float maximum = gamePlayer.Player.HealthController.GetBodyPartHealth(EBodyPart.Common, false).Maximum;
|
||||
float healthBarHeight = GameUtils.Map(current, 0f, maximum, 0f, boxHeight);
|
||||
Render.DrawLine(new Vector2(gamePlayer.ScreenPosition.x - boxWidth / 2f - 3f, boxPositionY + boxHeight - healthBarHeight),
|
||||
new Vector2(gamePlayer.ScreenPosition.x - boxWidth / 2f - 3f, boxPositionY + boxHeight), 3f, PlayerESP._healthColor);
|
||||
}
|
||||
public void OnGUI()
|
||||
{
|
||||
if (!Settings.DrawPlayers)
|
||||
return;
|
||||
if (Main.notReady())
|
||||
return;
|
||||
foreach (GamePlayer gamePlayer in Main.GamePlayers)
|
||||
{
|
||||
if (!gamePlayer.IsOnScreen)
|
||||
continue;
|
||||
if (gamePlayer.Distance > Settings.DrawPlayersDistance)
|
||||
continue;
|
||||
if (gamePlayer.Player == Main.LocalPlayer)
|
||||
continue;
|
||||
|
||||
Color color = gamePlayer.IsAI ? PlayerESP._botColor : PlayerESP._playerColor;
|
||||
float boxPositionY = (gamePlayer.HeadScreenPosition.y - 10f);
|
||||
float boxHeight = (Math.Abs(gamePlayer.HeadScreenPosition.y - gamePlayer.ScreenPosition.y) + 10f);
|
||||
float boxWidth = (boxHeight * 0.65f);
|
||||
|
||||
if (Settings.DrawPlayerBox)
|
||||
Render.DrawBox(gamePlayer.ScreenPosition.x - boxWidth / 2f, boxPositionY, boxWidth, boxHeight, color);
|
||||
|
||||
if (Settings.DrawPlayerSkeletons)
|
||||
PlayerSkeletons.DrawSkeleton(new GamePlayer(gamePlayer.Player), _skeletonColor);
|
||||
|
||||
if (Settings.DrawPlayerHealth)
|
||||
DrawPlayerHealth(gamePlayer, boxPositionY, boxHeight, boxWidth);
|
||||
|
||||
if (Settings.DrawPlayerName)
|
||||
DrawPlayerName(gamePlayer, ref color);
|
||||
|
||||
if (Settings.DrawPlayerLine)
|
||||
Render.DrawLine(new Vector2((float)(Screen.width / 2), (float)Screen.height),
|
||||
new Vector2(gamePlayer.ScreenPosition.x, gamePlayer.ScreenPosition.y),
|
||||
1.5f, Color.red);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
82
EscapeFromTarkovCheat/Features/ESP/PlayerSkeletons.cs
Normal file
82
EscapeFromTarkovCheat/Features/ESP/PlayerSkeletons.cs
Normal file
|
|
@ -0,0 +1,82 @@
|
|||
using UnityEngine;
|
||||
using EscapeFromTarkovCheat.Data;
|
||||
using EscapeFromTarkovCheat.Utils;
|
||||
|
||||
namespace EscapeFromTarkovCheat.Feauters.ESP
|
||||
{
|
||||
public static class PlayerSkeletons
|
||||
{
|
||||
public static void DrawSkeleton(GamePlayer gamePlayer, Color skeletonColor)
|
||||
{
|
||||
if (GameUtils.IsPlayerValid(gamePlayer.Player))
|
||||
{
|
||||
// 可视检查 : Visible
|
||||
// Color skeletonColor = GameUtils.IsPlayerVisible(gamePlayer.Player) ? Color.green : Color.red;
|
||||
|
||||
// 头胸腹 : head, neck, chest, stomach
|
||||
Vector3 headPos = gamePlayer.GetBonePosition(BoneType.HumanHead);
|
||||
Vector3 neckPos = gamePlayer.GetBonePosition(BoneType.HumanNeck);
|
||||
Vector3 spinePos = gamePlayer.GetBonePosition(BoneType.HumanSpine3);
|
||||
Vector3 pelvisPos = gamePlayer.GetBonePosition(BoneType.HumanPelvis);
|
||||
|
||||
// 左右手臂 : left arm, right arm
|
||||
Vector3 leftShoulderPos = gamePlayer.GetBonePosition(BoneType.HumanLCollarbone);
|
||||
Vector3 leftUpperArmPos = gamePlayer.GetBonePosition(BoneType.HumanLUpperarm);
|
||||
Vector3 leftElbowPos = gamePlayer.GetBonePosition(BoneType.HumanLForearm1);
|
||||
Vector3 leftForearmPos = gamePlayer.GetBonePosition(BoneType.HumanLForearm2);
|
||||
Vector3 leftHandPos = gamePlayer.GetBonePosition(BoneType.HumanLPalm);
|
||||
|
||||
Vector3 rightShoulderPos = gamePlayer.GetBonePosition(BoneType.HumanRCollarbone);
|
||||
Vector3 rightUpperArmPos = gamePlayer.GetBonePosition(BoneType.HumanRUpperarm);
|
||||
Vector3 rightElbowPos = gamePlayer.GetBonePosition(BoneType.HumanRForearm1);
|
||||
Vector3 rightForearmPos = gamePlayer.GetBonePosition(BoneType.HumanRForearm2);
|
||||
Vector3 rightHandPos = gamePlayer.GetBonePosition(BoneType.HumanRPalm);
|
||||
|
||||
// 左右腿足 : left leg, right leg
|
||||
Vector3 leftHipPos = gamePlayer.GetBonePosition(BoneType.HumanLThigh1);
|
||||
Vector3 leftThigh2Pos = gamePlayer.GetBonePosition(BoneType.HumanLThigh2);
|
||||
Vector3 leftKneePos = gamePlayer.GetBonePosition(BoneType.HumanLCalf);
|
||||
Vector3 leftCalfPos = gamePlayer.GetBonePosition(BoneType.HumanLCalf);
|
||||
Vector3 leftFootPos = gamePlayer.GetBonePosition(BoneType.HumanLFoot);
|
||||
|
||||
Vector3 rightHipPos = gamePlayer.GetBonePosition(BoneType.HumanRThigh1);
|
||||
Vector3 rightThigh2Pos = gamePlayer.GetBonePosition(BoneType.HumanRThigh2);
|
||||
Vector3 rightKneePos = gamePlayer.GetBonePosition(BoneType.HumanRCalf);
|
||||
Vector3 rightCalfPos = gamePlayer.GetBonePosition(BoneType.HumanRCalf);
|
||||
Vector3 rightFootPos = gamePlayer.GetBonePosition(BoneType.HumanRFoot);
|
||||
|
||||
// 绘制 : rendering
|
||||
// 头脖胸 : head, neck, chest
|
||||
Render.DrawBoneLine(headPos, neckPos, 1.5f, skeletonColor);
|
||||
Render.DrawBoneLine(neckPos, spinePos, 1.5f, skeletonColor);
|
||||
Render.DrawBoneLine(spinePos, pelvisPos, 1.5f, skeletonColor);
|
||||
|
||||
// 左右手臂 : left arm, right arm
|
||||
Render.DrawBoneLine(neckPos, leftShoulderPos, 1.5f, skeletonColor);
|
||||
Render.DrawBoneLine(leftShoulderPos, leftUpperArmPos, 1.5f, skeletonColor);
|
||||
Render.DrawBoneLine(leftUpperArmPos, leftElbowPos, 1.5f, skeletonColor);
|
||||
Render.DrawBoneLine(leftElbowPos, leftForearmPos, 1.5f, skeletonColor);
|
||||
Render.DrawBoneLine(leftForearmPos, leftHandPos, 1.5f, skeletonColor);
|
||||
|
||||
Render.DrawBoneLine(neckPos, rightShoulderPos, 1.5f, skeletonColor);
|
||||
Render.DrawBoneLine(rightShoulderPos, rightUpperArmPos, 1.5f, skeletonColor);
|
||||
Render.DrawBoneLine(rightUpperArmPos, rightElbowPos, 1.5f, skeletonColor);
|
||||
Render.DrawBoneLine(rightElbowPos, rightForearmPos, 1.5f, skeletonColor);
|
||||
Render.DrawBoneLine(rightForearmPos, rightHandPos, 1.5f, skeletonColor);
|
||||
|
||||
// 左右腿足 : left leg, right leg
|
||||
Render.DrawBoneLine(pelvisPos, leftHipPos, 1.5f, skeletonColor);
|
||||
Render.DrawBoneLine(leftHipPos, leftThigh2Pos, 1.5f, skeletonColor);
|
||||
Render.DrawBoneLine(leftThigh2Pos, leftKneePos, 1.5f, skeletonColor);
|
||||
Render.DrawBoneLine(leftKneePos, leftCalfPos, 1.5f, skeletonColor);
|
||||
Render.DrawBoneLine(leftCalfPos, leftFootPos, 1.5f, skeletonColor);
|
||||
|
||||
Render.DrawBoneLine(pelvisPos, rightHipPos, 1.5f, skeletonColor);
|
||||
Render.DrawBoneLine(rightHipPos, rightThigh2Pos, 1.5f, skeletonColor);
|
||||
Render.DrawBoneLine(rightThigh2Pos, rightKneePos, 1.5f, skeletonColor);
|
||||
Render.DrawBoneLine(rightKneePos, rightCalfPos, 1.5f, skeletonColor);
|
||||
Render.DrawBoneLine(rightCalfPos, rightFootPos, 1.5f, skeletonColor);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue