public void OnGotoClick() { Mascot mascot = Service.Get <MascotService>().GetMascot(questData.Mascot.name); Service.Get <TutorialManager>().SetTutorial(mascot.Definition.QuestReminderTutorialId, isComplete: true); if (mascot == null) { return; } PlayerSpawnPositionManager component = SceneRefs.ZoneLocalPlayerManager.LocalPlayerGameObject.GetComponent <PlayerSpawnPositionManager>(); if (component != null) { SpawnedAction spawnedAction = new SpawnedAction(); spawnedAction.Quest = associatedQuest; if (replayQuest) { spawnedAction.Action = SpawnedAction.SPAWNED_ACTION.ReplayQuest; } else { spawnedAction.Action = SpawnedAction.SPAWNED_ACTION.StartQuest; } component.SpawnPlayer(new SpawnPlayerParams.SpawnPlayerParamsBuilder(mascot.Definition.SpawnPlayerNearMascotPosition).Zone(mascot.Definition.Zone).SpawnedAction(spawnedAction).Build()); } }
public void OnEnable() { if (SceneRefs.ZoneLocalPlayerManager.LocalPlayerGameObject != null) { PlayerSpawnPositionManager component = SceneRefs.ZoneLocalPlayerManager.LocalPlayerGameObject.GetComponent <PlayerSpawnPositionManager>(); if (component != null) { component.spawnAtSceneLocation(); } } }
private void goToLocationInZone(Vector3 location, string sceneName, CellPhoneActivityDefinition definition, Reward reward) { PlayerSpawnPositionManager component = SceneRefs.ZoneLocalPlayerManager.LocalPlayerGameObject.GetComponent <PlayerSpawnPositionManager>(); if (component != null) { SpawnedAction spawnedAction = new SpawnedAction(); spawnedAction.Action = SpawnedAction.SPAWNED_ACTION.None; component.SpawnPlayer(new SpawnPlayerParams.SpawnPlayerParamsBuilder(location).SceneName(sceneName).SpawnedAction(spawnedAction).PendingReward(reward) .Build()); } Service.Get <ICPSwrveService>().Action("activity_tracker", "quick_go", definition.GetType().ToString(), definition.name); }
private void goToLocationInZone() { PlayerSpawnPositionManager component = SceneRefs.ZoneLocalPlayerManager.LocalPlayerGameObject.GetComponent <PlayerSpawnPositionManager>(); if (component != null) { SpawnedAction spawnedAction = new SpawnedAction(); spawnedAction.Action = SpawnedAction.SPAWNED_ACTION.None; component.SpawnPlayer(new SpawnPlayerParams.SpawnPlayerParamsBuilder(widgetData.LocationInZone).SceneName(widgetData.Scene.SceneName).SpawnedAction(spawnedAction).Build()); if (Service.Get <SceneTransitionService>().CurrentScene == widgetData.Scene.SceneName) { Service.Get <EventDispatcher>().DispatchEvent(default(CellPhoneEvents.CellPhoneClosed)); } } Service.Get <ICPSwrveService>().Action("activity_tracker", "go", "starting_soon", widgetData.name); }
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); }
private void onButtonClick() { if (Object.FindObjectOfType <CellPhoneActivityScreenController>() != null) { Service.Get <EventDispatcher>().DispatchEvent(default(CellPhoneEvents.CellPhoneClosed)); } PlayerSpawnPositionManager component = SceneRefs.ZoneLocalPlayerManager.LocalPlayerGameObject.GetComponent <PlayerSpawnPositionManager>(); if (component != null) { component.SpawnPlayer(new SpawnPlayerParams.SpawnPlayerParamsBuilder(Position).Zone(Zone).SceneName(SceneName).Build()); } if (!string.IsNullOrEmpty(SwrveLogTier1)) { Service.Get <ICPSwrveService>().Action(SwrveLogTier1); } }
private void goToLocationInZone() { PlayerSpawnPositionManager component = SceneRefs.ZoneLocalPlayerManager.LocalPlayerGameObject.GetComponent <PlayerSpawnPositionManager>(); if (component != null) { SpawnedAction spawnedAction = new SpawnedAction(); spawnedAction.Action = SpawnedAction.SPAWNED_ACTION.None; component.SpawnPlayer(new SpawnPlayerParams.SpawnPlayerParamsBuilder(widgetData.LocationInZone).SceneName(widgetData.Scene.SceneName).SpawnedAction(spawnedAction).Build()); if (Service.Get <SceneTransitionService>().CurrentScene == widgetData.Scene.SceneName) { Service.Get <EventDispatcher>().DispatchEvent(default(CellPhoneEvents.CellPhoneClosed)); } } saveWidgetAsAccessed(); logGoThereBI((widgetData as CellPhoneFeatureActivityDefinition != null) ? "boost" : "event", widgetData.name); }
private void startQuest(QuestDefinition questDefinition) { PlayerSpawnPositionManager component = SceneRefs.ZoneLocalPlayerManager.LocalPlayerGameObject.GetComponent <PlayerSpawnPositionManager>(); if (component != null) { Quest quest = Service.Get <QuestService>().GetQuest(questDefinition); SpawnedAction spawnedAction = new SpawnedAction(); spawnedAction.Quest = quest; spawnedAction.Action = SpawnedAction.SPAWNED_ACTION.StartQuest; component.SpawnPlayer(new SpawnPlayerParams.SpawnPlayerParamsBuilder(quest.Mascot.Definition.SpawnPlayerNearMascotPosition).Zone(quest.Mascot.Definition.Zone).SpawnedAction(spawnedAction).Build()); if (Service.Get <SceneTransitionService>().CurrentScene == quest.Mascot.Definition.Zone.ZoneName) { Service.Get <EventDispatcher>().DispatchEvent(default(CellPhoneEvents.CellPhoneClosed)); } } Service.Get <ICPSwrveService>().Action("activity_tracker", "go", "adventure", $"{questDefinition.Mascot.name}_{questDefinition.ChapterNumber}_{questDefinition.QuestNumber}"); }