Exemplo n.º 1
0
        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);
        }
Exemplo n.º 2
0
 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);
     }
 }