private void Update() { if (DebugPlayer) { RigData debugRigData = DebugPlayer.GetRigData(); RigData tempData = new RigData(debugRigData.Head); foreach (Player player in players) { if (player.quality == 1) { tempData = new RigData(debugRigData.Head); } if (player.quality == 2) { tempData = new RigData(debugRigData.Head, debugRigData.Left, debugRigData.Right); } else if (player.quality == 3) { tempData = new RigData(debugRigData.Head, debugRigData.Left, debugRigData.Right, debugRigData.LeftShoulder, debugRigData.RightShoulder, debugRigData.LeftElbow, debugRigData.RightElbow); } NetworkingManager.SetRigDataByID(player.id, tempData); } } }
/// <summary> /// returns whether the rigData was there to change /// </summary> public static bool SetRigDataByID(int id, RigData data) { if (!rigsData.ContainsKey(id)) { return(false); } rigsData[id] = data; return(true); }