public void StartClient(string fileName) { this.fileName = fileName; bridgeActive = false; transmittingFloat = 1; APImanager = gameObject.AddComponent(typeof(APIManager)) as APIManager; APImanager.CustomAwake(this); Debug.Log("API Built"); floatFile = gameObject.AddComponent(typeof(FloatFile)) as FloatFile; floatFile.ConnectToServer(this); cameraFeeds = new List <CameraFeed>(); vesselControl = gameObject.GetComponent <VesselControl>(); vesselControl.ControlAwake(this); // Debug.Log("Vessel Control Initialized"); roboticController = gameObject.GetComponent <RoboticController>(); if (roboticController) { roboticController.CustomAwake(this); Debug.Log("Robotics Configured"); } // debugWriteToSelf = GetComponent<KSPMechs.MechManager>().debugWriteToSelf; // SetFloat("TestFromClient" + fileName, 4); SetBool("ClientTransmitting" + fileName, true); //for (int i = 0; i < 1000; i++) //{ // SetFloat("test" + i.ToString(), i); //} }
public void Awake() { customGround = gameObject; mechController = FindObjectOfType <RoboticController>(); groundMeshRenderer = customGround.GetComponent <MeshRenderer>(); groundMeshFilter = customGround.GetComponent <MeshFilter>(); groundMeshvertices = groundMeshFilter.mesh.vertices; }
public override void OnInspectorGUI() { RoboticController roboController = (RoboticController)target; //// roboController.curveX = AnimationCurve.EaseInOut(0, 0, roboController.strideLength, 0); //roboController.curveX = EditorGUILayout.CurveField("Animation on X", roboController.curveX); // var newStride = EditorGUILayout.FloatField("Stride Length", roboController.strideLength); //if(newStride != roboController.strideLength) //{ // Debug.Log("set new curve"); // roboController.strideLength = newStride; // roboController.gaitCurve = AnimationCurve.Linear(0, 0, roboController.strideLength, roboController.strideLength); // // roboController.gaitCurve. //} base.DrawDefaultInspector(); }