Beispiel #1
0
        private void Scene_SelectionChanged(object sender, EventArgs e)
        {
            var selectedObjects = scene.SelectedObjects.ToArray();

            if (selectedObjects.Length == 2 && selectedObjects[0] is WorldMapPoint && selectedObjects[1] is WorldMapPoint)
            {
                WorldMapPoint point1 = (WorldMapPoint)selectedObjects[0];
                WorldMapPoint point2 = (WorldMapPoint)selectedObjects[1];

                objectUIControl1.ClearObjectUIContainers();

                if (scene.TryGetConnection(point1.BoneName, point2.BoneName, out routeEntry))
                {
                    objectUIControl1.AddObjectUIContainer(new ConnectionUIContainer(routeEntry, scene), "Connection");
                }

                objectUIControl1.Refresh();
            }
            else
            {
                scene.SetupObjectUIControl(objectUIControl1);
            }

            sceneListView1.Refresh();
        }
Beispiel #2
0
        public bool TryGetPoint(string name, out WorldMapPoint point)
        {
            foreach (var obj in WorldMapObjects)
            {
                if (obj is WorldMapPoint _point)
                {
                    if (_point.BoneName == name)
                    {
                        point = _point;
                        return(true);
                    }
                }
            }

            foreach (var route in Routes)
            {
                foreach (var _point in route.RoutePoints)
                {
                    if (_point.BoneName == name)
                    {
                        point = _point;
                        return(true);
                    }
                }
            }

            point = null;
            return(false);
        }
Beispiel #3
0
 public WorldMapPointUIContainer(WorldMapPoint obj, EditorSceneBase scene)
 {
     this.obj   = obj;
     this.scene = scene;
 }