private BattleUnitBehaviour CreateBattleUnitView(ClientEntity entity) { var go = Service.Instance.gameObjectCreateService.CreateGameObject(entity.asset.value); go.transform.SetParent(battleUnitRoot, false); BattleUnitBehaviour view = go.GetComponent <BattleUnitBehaviour>(); view.Link(entity); return(view); }
protected override void Execute(List <ClientEntity> entities) { foreach (var e in entities) { BattleUnitBehaviour view = CreateBattleUnitView(e); e.AddView(view); e.AddClientPositionListener(view); e.AddClientDirectionListener(view); } }