Ejemplo n.º 1
0
 public override void Apply(WorldObject worldObject)
 {
     base.Apply(worldObject);
     if (worldObject is Spinner) {
         ((Spinner)worldObject).ListenMouseDown += RemoveSpinnerLogic;
     }
 }
Ejemplo n.º 2
0
 public override void Remove(WorldObject worldObject)
 {
     base.Remove(worldObject);
     if (worldObject is Spinner) {
         ((Spinner)worldObject).ListenMouseDown -= RemoveSpinnerLogic;
     }
 }
 public WorldValidationResult(bool valid, String alertReason = null, WorldObject invalidNode = null)
     : this()
 {
     AlertReason = alertReason;
     Valid = valid;
     InvalidNode = invalidNode;
 }
Ejemplo n.º 4
0
        public override void Apply(WorldObject worldObject)
        {
            base.Apply(worldObject);

            if (worldObject is Spinner) {
                ((Spinner)worldObject).ListenMouseDown += SelectWorldObject;
            }
        }
Ejemplo n.º 5
0
 public override void Remove(WorldObject worldObject)
 {
 }
Ejemplo n.º 6
0
 public override void Apply(WorldObject worldObject)
 {
 }
Ejemplo n.º 7
0
        private void SetSelectedWorldObject(WorldObject worldObject)
        {
            if (_currentlySelectedWorldObject != null) {
                _currentlySelectedWorldObject.ResetColorState();
            }

            SetSelectedNode(worldObject as Node);
            _currentlySelectedWorldObject = worldObject;
            _objectDragger.CurrentlySelectedObject = worldObject;
        }
Ejemplo n.º 8
0
 private CameraTarget GetCameraTarget(WorldObject worldObject)
 {
     var cameraTarget = new CameraTarget(worldObject, _cameraTargetArrow, GraphicsDevice.Viewport.Width, GraphicsDevice.Viewport.Height);
     cameraTarget.SetColorState(ColorState.Glow);
     cameraTarget.ListenMouseDown += (target, location) => PanCameraToObject(worldObject);
     return cameraTarget;
 }
Ejemplo n.º 9
0
 protected void PanCameraToObject(WorldObject obj)
 {
     CameraTarget = obj;
     AutoCamera = true;
 }
Ejemplo n.º 10
0
 protected void AddLowPriorityTarget(WorldObject obj)
 {
     LowPriorityTargets.Add(GetCameraTarget(obj));
 }
Ejemplo n.º 11
0
 public override void Remove(WorldObject worldObject)
 {
     if (worldObject is Node)
         Remove(worldObject as Node);
 }
Ejemplo n.º 12
0
 public override void Apply(WorldObject worldObject)
 {
     if (worldObject is Node)
         Apply(worldObject as Node);
 }
Ejemplo n.º 13
0
 public abstract void Remove(WorldObject worldObject);
Ejemplo n.º 14
0
 public abstract void Apply(WorldObject worldObject);
Ejemplo n.º 15
0
        private void SelectWorldObject(WorldObject worldObject, Vector2 location)
        {
            if (!IsValidNode(worldObject as Node)) return;

            SetWorldObject(worldObject);
        }