public void Move(Position p, float timeToTake) { PositionedObjectChangedEventArgs args = new PositionedObjectChangedEventArgs(PositionedObjectChangedType.Position); args.Type = PositionedObjectChangedType.Position; this.Position = p; OnChange(args); }
protected void OnChange(PositionedObjectChangedEventArgs args) { if (Changed != null) { Changed(this, args); } }
public virtual void InterestTargetChanged(object sender, PositionedObjectChangedEventArgs e) { // Do internal stuff. ViewChangedEventArgs args = new ViewChangedEventArgs(); PositionedObjectChange ch = new PositionedObjectChange(); ch.objectId = ((PositionedObject)sender).Id; args.change = ch; OnViewChanged(args); }