From 8385f09313a0e5a16a0413fca7f342579a796114 Mon Sep 17 00:00:00 2001 From: Logophilist Date: Mon, 19 Oct 2020 14:25:09 +0200 Subject: [PATCH] Bike animation added --- ClientApp/Utils/EngineConnection.cs | 4 ++-- RH-Engine/Command.cs | 5 +++++ RH-Engine/Program.cs | 6 +++--- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/ClientApp/Utils/EngineConnection.cs b/ClientApp/Utils/EngineConnection.cs index 5113262..a717d0c 100644 --- a/ClientApp/Utils/EngineConnection.cs +++ b/ClientApp/Utils/EngineConnection.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.Text; using RH_Engine; @@ -236,7 +236,7 @@ namespace ClientApp.Utils Write("Starting route follow..."); FollowingRoute = true; - SendMessageAndOnResponse(mainCommand.AddBikeModel("bikeID"), "bikeID", + SendMessageAndOnResponse(mainCommand.AddBikeModelAnim("bikeID", 0.01f), "bikeID", (message) => { bikeId = JSONParser.GetResponseUuid(message); diff --git a/RH-Engine/Command.cs b/RH-Engine/Command.cs index a962372..065647a 100644 --- a/RH-Engine/Command.cs +++ b/RH-Engine/Command.cs @@ -253,6 +253,11 @@ namespace RH_Engine return AddModel("bike", serial, "data\\NetworkEngine\\models\\bike\\bike.fbx"); } + public string AddBikeModelAnim(string serial, float scalar) + { + return AddModel("bike", serial, "data\\NetworkEngine\\models\\bike\\bike_anim.fbx", "Armature|Fietsen", new float[] { 0, 0, 0 }, scalar, new float[] { 0, 0, 0 }); + } + public string AddModel(string nodeName, string serial, string fileLocation) { return AddModel(nodeName, serial, fileLocation, null, new float[] { 0, 0, 0 }, 1, new float[] { 0, 0, 0 }); diff --git a/RH-Engine/Program.cs b/RH-Engine/Program.cs index 5eba099..115de6c 100644 --- a/RH-Engine/Program.cs +++ b/RH-Engine/Program.cs @@ -19,9 +19,9 @@ namespace RH_Engine //new PC("DESKTOP-M2CIH87", "Fabian"), //new PC("T470S", "Shinichi"), //new PC("DESKTOP-DHS478C", "semme"), - new PC("HP-ZBOOK-SEM", "Sem"), + //new PC("HP-ZBOOK-SEM", "Sem"), //new PC("DESKTOP-TV73FKO", "Wouter"), - //new PC("DESKTOP-SINMKT1", "Ralf van Aert"), + new PC("DESKTOP-SINMKT1", "Ralf van Aert"), //new PC("NA", "Bart") }; @@ -185,7 +185,7 @@ namespace RH_Engine //Add route, bike and put camera and bike to follow route at same speed. SendMessageAndOnResponse(stream, mainCommand.RouteCommand("routeID"), "routeID", (message) => routeId = JSONParser.GetResponseUuid(message)); - SendMessageAndOnResponse(stream, mainCommand.AddBikeModel("bikeID"), "bikeID", + SendMessageAndOnResponse(stream, mainCommand.AddBikeModelAnim("bikeID", 0.01f), "bikeID", (message) => { bikeId = JSONParser.GetResponseUuid(message);