public AddNewPointTool(Rectangle rectangle, int x, int y, InfluenceAreaDataControl iadc)
 {
     this.rectangle   = rectangle;
     this.iadc        = iadc;
     oldInfluenceArea = (InfluenceArea)iadc.getContent();
     newPoint         = new Vector2(x, y);
 }
示例#2
0
 public DeletePointTool(Rectangle rectangle, Vector2 point, InfluenceAreaDataControl iadc)
 {
     this.rectangle   = rectangle;
     this.oldPoint    = point;
     this.oldIndex    = rectangle.getPoints().IndexOf(point);
     this.iadc        = iadc;
     oldInfluenceArea = (InfluenceArea)iadc.getContent();
 }
示例#3
0
    /**
     * Constructor.
     *
     * @param sceneDataControl
     *            Parent scene controller
     * @param activeArea
     *            Exit of the data control structure
     */
    public ActiveAreaDataControl(SceneDataControl sceneDataControl, ActiveArea activeArea)
    {
        this.sceneDataControl         = sceneDataControl;
        this.activeArea               = activeArea;
        conditionsController          = new ConditionsController(new Conditions());
        this.influenceAreaDataControl = new InfluenceAreaDataControl(sceneDataControl, activeArea.getInfluenceArea(), this);
        descriptionsController        = new DescriptionsController(activeArea.getDescriptions());

        // Create subcontrollers
        actionsListDataControl = new ActionsListDataControl(activeArea.getActions(), this);
    }
    /**
     * Constructor.
     *
     * @param sceneDataControl
     *            Parent scene controller
     * @param exit
     *            Exit of the data control structure
     */
    public ExitDataControl(SceneDataControl sceneDataControl, Exit exit)
    {
        this.sceneDataControl = sceneDataControl;
        this.exit             = exit;

        this.influenceAreaDataControl = new InfluenceAreaDataControl(sceneDataControl, exit.getInfluenceArea(), this);
        effectsController             = new EffectsController(exit.getEffects());
        postEffectsController         = new EffectsController(exit.getPostEffects());
        notEffectsController          = new EffectsController(exit.getNotEffects());
        conditionsController          = new ConditionsController(new Conditions());
        exitLookDataControl           = new ExitLookDataControl(exit);
    }
示例#5
0
    /**
     * Contructor.
     *
     * @param sceneDataControl
     *            Parent scene controller
     * @param elementReference
     *            Element reference of the data control structure
     */
    public ElementReferenceDataControl(SceneDataControl sceneDataControl, ElementReference elementReference, int type, int referenceNumber)
    {
        this.sceneDataControl = sceneDataControl;
        this.elementReference = elementReference;
        this.type             = type;
        this.visible          = true;
        if (type == Controller.ITEM_REFERENCE || type == Controller.NPC_REFERENCE)
        {
            this.influenceAreaDataControl = new InfluenceAreaDataControl(sceneDataControl, elementReference.getInfluenceArea(), this);
        }

        // Create subcontrollers
        Dictionary <string, ConditionsController.ConditionContextProperty> context1 = new Dictionary <string, ConditionsController.ConditionContextProperty>();

        ConditionsController.ConditionOwner parent = new ConditionsController.ConditionOwner(Controller.SCENE, sceneDataControl.getId());
        ConditionsController.ConditionOwner owner  = new ConditionsController.ConditionOwner(type, elementReference.getTargetId(), parent);
        context1.Add(ConditionsController.CONDITION_OWNER, owner);

        conditionsController = new ConditionsController(elementReference.getConditions(), context1);
    }