4 [
Attribute(
"", UIWidgets.ResourcePickerThumbnail,
"Objective or waypoint prefab",
"et")]
5 protected ResourceName m_CommandPrefab;
7 protected void FilterEntities(notnull set<SCR_EditableEntityComponent> inEntities, out notnull set<SCR_EditableEntityComponent> outEntities)
9 outEntities.Copy(inEntities);
12 protected set<SCR_EditableEntityComponent> GetSelectedEntities(notnull set<SCR_EditableEntityComponent> inEntities)
14 set<SCR_EditableEntityComponent> selectedEnities =
new set<SCR_EditableEntityComponent>();
15 FilterEntities(inEntities, selectedEnities);
16 return selectedEnities;
20 bool StartPlacing(notnull set<SCR_EditableEntityComponent> selectedEntities)
27 return placingManager.SetSelectedPrefab(m_CommandPrefab, recipients: GetSelectedEntities(selectedEntities));
30 override void Perform(
SCR_EditableEntityComponent hoveredEntity, notnull set<SCR_EditableEntityComponent> selectedEntities, vector cursorWorldPosition,
int flags,
int param = -1)
32 if (cursorWorldPosition == vector.Zero)
42 Math3D.MatrixIdentity3(transform);
43 transform[3] = cursorWorldPosition;
46 placingManager.CreateEntity(m_CommandPrefab,
params, !isQueue,
false, GetSelectedEntities(selectedEntities));
95 protected void OnCurrentActionChanged()
98 if (commandActionsManager)
99 Toggle(0, commandActionsManager.IsActionCurrent(
this))
101 override void Track()
104 if (commandActionsManager)
106 commandActionsManager.GetOnCurrentActionChanged().Insert(OnCurrentActionChanged);
107 OnCurrentActionChanged();
110 override void Untrack()
113 if (commandActionsManager)
114 commandActionsManager.GetOnCurrentActionChanged().Remove(OnCurrentActionChanged);
116 override bool IsServer()