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); }
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); }