/** * Constructor * * @param npc * Contained NPC data */ public NPCDataControl(NPC npc) { this.npc = npc; this.resourcesList = npc.getResources(); selectedResources = 0; // Add a new resource if the list is empty if (resourcesList.Count == 0) { resourcesList.Add(new ResourcesUni()); } // Create the subcontrollers resourcesDataControlList = new List <ResourcesDataControl>(); foreach (ResourcesUni resources in resourcesList) { resourcesDataControlList.Add(new ResourcesDataControl(resources, Controller.NPC)); } actionsListDataControl = new ActionsListDataControl(npc.getActions(), this); descriptionController = new DescriptionsController(npc.getDescriptions()); previewAnimations = new Dictionary <Orientation, Animation>(); ReloadPreviewAnimations(); }
/** * 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 item * Contained item */ public ItemDataControl(Item item) { this.item = item; this.resourcesList = item.getResources(); selectedResources = 0; // Add a new resource if the list is empty if (resourcesList.Count == 0) { resourcesList.Add(new ResourcesUni()); } // Create the subcontrollers resourcesDataControlList = new List <ResourcesDataControl>(); foreach (ResourcesUni resources in resourcesList) { resourcesDataControlList.Add(new ResourcesDataControl(resources, Controller.ITEM)); } actionsListDataControl = new ActionsListDataControl(item.getActions(), this); descriptionController = new DescriptionsController(item.getDescriptions()); }
public ActionsListReceiver(ActionsListDataControl actionsListDataControl) { this.actionsListDataControl = actionsListDataControl; }