You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
641 B
22 lines
641 B
using ET.EventType; |
|
|
|
namespace ET |
|
{ |
|
[FriendClass(typeof(Building))] |
|
public class AfterCreateBuilding_AddComponent : AEvent<EventType.AfterCreateBuilding> |
|
{ |
|
protected override void Run(AfterCreateBuilding args) |
|
{ |
|
var unit = args.Unit; |
|
var building = args.Building; |
|
// 升级的过程中不显示原先的建筑 |
|
if (building.IsUpgrade == 0) |
|
{ |
|
var buildingViewComp = building.AddComponent<BuildingViewComponent>(); |
|
buildingViewComp.CreateName().Coroutine(); |
|
} |
|
|
|
// update map info |
|
} |
|
} |
|
} |