Example #1
0
    private CellPhoneSaleActivityDefinition.MarketPlaceSaleData getMarketplaceSaleDateForGoButton()
    {
        CellPhoneSaleActivityDefinition.MarketPlaceSaleData result = saleData.MarketPlaceData[0];
        Scene activeScene = SceneManager.GetActiveScene();

        for (int i = 0; i < saleData.MarketPlaceData.Length; i++)
        {
            if (saleData.MarketPlaceData[i].Scene.SceneName == activeScene.name)
            {
                result = saleData.MarketPlaceData[i];
            }
        }
        return(result);
    }
Example #2
0
    private void goToLocationInZone()
    {
        PlayerSpawnPositionManager component = ClubPenguin.SceneRefs.ZoneLocalPlayerManager.LocalPlayerGameObject.GetComponent <PlayerSpawnPositionManager>();

        if (component != null)
        {
            CellPhoneSaleActivityDefinition.MarketPlaceSaleData marketplaceSaleDateForGoButton = getMarketplaceSaleDateForGoButton();
            SpawnedAction spawnedAction = new SpawnedAction();
            spawnedAction.Action = SpawnedAction.SPAWNED_ACTION.None;
            component.SpawnPlayer(new SpawnPlayerParams.SpawnPlayerParamsBuilder(marketplaceSaleDateForGoButton.PositionInZone).SceneName(marketplaceSaleDateForGoButton.Scene.SceneName).SpawnedAction(spawnedAction).Build());
            if (Service.Get <SceneTransitionService>().CurrentScene == marketplaceSaleDateForGoButton.Scene.SceneName)
            {
                Service.Get <EventDispatcher>().DispatchEvent(default(CellPhoneEvents.CellPhoneClosed));
            }
        }
        Service.Get <ICPSwrveService>().Action("activity_tracker", "go", "starting_soon", saleData.name);
    }