private void DrawSelection() { GUI.skin = ResourceManager.SelectBoxSkin; Rect selectBox = WorkManager.CalculateSelectionBox(Agent.Body.GetSelectionBounds(), (Agent as RTSAgent).GetPlayerArea()); // Draw the selection box around the currently selected object, within the bounds of the playing area GUI.BeginGroup((Agent as RTSAgent).GetPlayerArea()); DrawSelectionBox(selectBox); GUI.EndGroup(); }
private void DrawBuildProgress() { GUI.skin = ResourceManager.SelectBoxSkin; Rect selectBox = WorkManager.CalculateSelectionBox(Agent.Body.GetSelectionBounds(), (Agent as RTSAgent).GetPlayerArea()); //Draw the selection box around the currently selected object, within the bounds of the main draw area GUI.BeginGroup((Agent as RTSAgent).GetPlayerArea()); CalculateCurrentHealth(0.5f, 0.99f); DrawHealthBar(selectBox, "Building ..."); GUI.EndGroup(); }
private void DrawBuildProgress() { GUI.skin = GameResourceManager.SelectBoxSkin; Bounds selectionBounds = WorkManager.CalculateBounds(Agent.gameObject, Agent.Body._position.ToVector3()); Rect selectBox = WorkManager.CalculateSelectionBox(selectionBounds, Agent.GetPlayerArea()); //Draw the selection box around the currently selected object, within the bounds of the main draw area GUI.BeginGroup(Agent.GetPlayerArea()); CalculateCurrentHealth(0.5f, 0.99f); DrawHealthBar(selectBox, "Constructing..."); GUI.EndGroup(); }
private void DrawSelection() { GUI.skin = GameResourceManager.SelectBoxSkin; Bounds selectionBounds = WorkManager.CalculateBounds(Agent.gameObject, Agent.Body._position.ToVector3()); Rect selectBox = WorkManager.CalculateSelectionBox(selectionBounds, Agent.GetPlayerArea()); // Draw the selection box around the currently selected object, within the bounds of the playing area GUI.BeginGroup(Agent.GetPlayerArea()); DrawSelectionBox(selectBox); GUI.EndGroup(); }