예제 #1
0
        public void CreateBattleShip(PSShip psShip, GameObject shipLayer, SimpleManager.GenericDelegate buttonDel, ShipManager.ShipCreationDelegate shipDel)
        {
            if (psShip == null || !Object.op_Inequality((Object)shipLayer, (Object)null))
            {
                return;
            }
            ShipBattleEntity battleShipObject = this.CreateBattleShipObject(psShip, shipLayer);

            this.SharedShipCreation((ShipEntity)battleShipObject, psShip, buttonDel);
            SceneViewManager instance = SingletonManager <SceneViewManager> .Instance;

            if (instance.CurrentPsBackground != null)
            {
                battleShipObject.cloakEntity.OuterCloak.set_sprite(SingletonManager <SpriteManager> .Instance.GetSpriteById(instance.CurrentPsBackground.BackgroundSpriteId).UnitySprite);
                battleShipObject.cloakEntity.InnerCloak.set_sprite(SingletonManager <SpriteManager> .Instance.GetSpriteById(instance.CurrentPsBackground.BackgroundSpriteId).UnitySprite);
            }
            if (shipDel == null)
            {
                return;
            }
            shipDel((ShipEntity)battleShipObject);
        }
예제 #2
0
        public void CreateMainShip(PSShip psShip, GameObject shipLayer, SimpleManager.GenericDelegate buttonDel, ShipManager.ShipCreationDelegate shipDel)
        {
            if (psShip == null || !Object.op_Inequality((Object)shipLayer, (Object)null))
            {
                return;
            }
            ShipMainEntity mainShipObject = this.CreateMainShipObject(psShip, shipLayer);

            this.SharedShipCreation((ShipEntity)mainShipObject, psShip, buttonDel);
            if (shipDel == null)
            {
                return;
            }
            shipDel((ShipEntity)mainShipObject);
        }