コード例 #1
0
ファイル: DynamicScene.cs プロジェクト: mksbamford/Moonfxsh
        private void OnSelectedObjectChanged(object seneder, SelectEventArgs e)
        {
            if (e.SelectedObject == null)
            {
                MousePole.DropHandlers();
                MousePole.Show(false);
                return;
            }
            var item = e.SelectedObject as CollisionObject;

            if (item != null)
            {
                var objectBlock = item.UserObject as ObjectBlock;
                if (objectBlock == null)
                {
                    return;
                }

                MousePole.Show(true);
                MousePole.DropHandlers();
                MousePole.WorldMatrix         = item.WorldTransform;
                MousePole.WorldMatrixChanged +=
                    delegate(object sender, MatrixChangedEventArgs args)
                {
                    CollisionManager.Move(item, args.Matrix.ClearScale(  ));
                    //Manager.UpdateInstance( objectBlock, item.UserIndex, item.WorldTransform );
                };
            }
        }
コード例 #2
0
        private void GetSelectedInstance(SelectEventArgs e)
        {
            var item = e.SelectedObject as CollisionObject;

            if (item == null || item == selectedCollisionObject)
            {
                selectedCollisionObject = null;
                selectedScenarioObject  = null;
                return;
            }
            var scenarioObject = item.UserObject as ObjectBlock;

            if (scenarioObject == null)
            {
                selectedCollisionObject = null;
                selectedScenarioObject  = null;
                return;
            }
            selectedScenarioObject  = new ScenarioObjectAxisAlignedWrapper(scenarioObject);
            selectedCollisionObject = item;
        }
コード例 #3
0
 public void OnSelectedObjectChanged(object sender, SelectEventArgs e)
 {
     GetSelectedInstance(e);
 }