21 changed files with 99 additions and 25 deletions
@ -0,0 +1,25 @@ |
|||||||
|
using ET.EventType; |
||||||
|
|
||||||
|
namespace ET |
||||||
|
{ |
||||||
|
using FUIBuilding; |
||||||
|
public class ConstructFinish_RefreshWindow : AEvent<EventType.AfterCreateBuilding> |
||||||
|
{ |
||||||
|
protected override void Run(AfterCreateBuilding args) |
||||||
|
{ |
||||||
|
var unit = args.Unit; |
||||||
|
var building = args.Building; |
||||||
|
|
||||||
|
var win = FUIComponent.Instance.GetWindow(FUI_BuildingInfoWindow.UIResName); |
||||||
|
if (win != null) |
||||||
|
{ |
||||||
|
var BuildingWin = win as FUIBuildingInfoWindowComponent; |
||||||
|
if (BuildingWin.Window.isShowing) |
||||||
|
{ |
||||||
|
BuildingWin.ShowInfo(building); |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
} |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,10 @@ |
|||||||
|
namespace ET |
||||||
|
{ |
||||||
|
public partial class WorldParametersConfigCategory |
||||||
|
{ |
||||||
|
public float GetUpgradePercent() |
||||||
|
{ |
||||||
|
return Get(WorldParam.UpgratePercent).Value[0] / 100.0f; |
||||||
|
} |
||||||
|
} |
||||||
|
} |
Loading…
Reference in new issue