Exemple #1
0
 public void hydrateState(ShipState state, Transform transform, Fleet fleet, Ship ship)
 {
     state.icon = AssetSingleton.getBundledDirectory <Sprite>(AssetSingleton.bundleNames.sprites, "star")[0];
     state.positionState.appearTransform = transform;
     state.weapons[0].init(state.positionState, state.weapons[0].weaponDescription);
     state.destructableState.onDestroy = () => onDestroy(state.id, ship, fleet);
 }
Exemple #2
0
        public Ship makeShip(ShipState shipState, Fleet fleet)
        {
            GameObject go;
            var        ship = makeTransforms(out go, fleet);

            GameManager.idMaker.insertObject(ship, shipState.id);
            hydrateState(shipState, go.transform, fleet, ship);
            var renderer = new SingleSceneAppearer(new sceneAppearInfo(shipPrefabs[0]), 3, shipState.positionState);

            ship.Init(shipState, renderer);
            return(ship);
        }