예제 #1
0
 public void UpdateSubPanels()
 {
     // show sub-panels based on activity
     ActorGameManager.ShowGroup(playModeControlsPanelName, State.gameActivity == GameActivity.play);
     ActorGameManager.ShowGroup(editModePanelName, State.gameActivity == GameActivity.edit);
     ActorGameManager.ShowGroup(testModePanelName, State.gameActivity == GameActivity.test);
 }
예제 #2
0
 public void ResetBoard()
 {
     Database.AddBoardMetric(metricType.play);
     ActorGameManager.ShowGroup(helpPanelName, false);
     ActorGameManager.ShowGroup(dialogPanel, false);
     ActorGameManager.ResetBoard();
 }
예제 #3
0
 public void EnterTestMode()
 {
     ActorGameManager.ShowGroup(testModePanelName, true);
     ActorGameManager.ShowGroup(playModeControlsPanelName, false);
     ActorGameManager.ShowGroup(editModePanelName, false);
     ActorGridManager.EnterTestMode();
     ActorGameManager.EnterTestMode();
     ActorGameManager.ShowGroup(helpPanelName, false);
 }
예제 #4
0
    public void CancelHint()
    {
        ActorGameManager.ShowGroup(getHintPanel, false);

        // Send Analytics Event
        Analytics.CustomEvent("Funnel", new Dictionary <string, object>
        {
            { State.GetBoardDisplayName(), 1 },
            { "HintCancelStore", 1 }
        });
    }
예제 #5
0
 public void UndoTurn()
 {
     // only charge gems when in normal play mode (not when in edit or test)
     if (Identity.GetGems() < 1 && State.gameActivity == GameActivity.play)
     {
         ActorGameManager.ShowGroup(getHintPanel, true);
     }
     else
     {
         ActorGameManager.UndoTurn();
     }
 }
예제 #6
0
    public void BuyGems()
    {
        ActorGameManager.ShowGroup(getHintPanel, false);
        StartCoroutine("LoadLevel", "store");

        // Send Analytics Event
        Analytics.CustomEvent("Funnel", new Dictionary <string, object>
        {
            { State.GetBoardDisplayName(), 1 },
            { "HintOpenStore", 1 }
        });
    }
예제 #7
0
    IEnumerator ShowPopularBoards()
    {
        yield return(null);

        State.gameBoardCategory = GameBoardCategory.popular;
        State.gameBoardMine     = false;
        State.gameSource        = GameSource.remote;
        State.gameActivity      = GameActivity.play;
        ActorGameManager.ShowGroup(pageUpButton, true);
        ActorGameManager.ShowGroup(pageDownButton, true);
        Database.GetPopularBoards(true);
    }
예제 #8
0
    IEnumerator ShowMyBoards()
    {
        yield return(null);

        State.gameBoardCategory = GameBoardCategory.mine;
        State.gameBoardMine     = true;
        State.gameSource        = GameSource.remote;
        State.gameActivity      = GameActivity.play;
        ActorGameManager.ShowGroup(pageUpButton, false);
        ActorGameManager.ShowGroup(pageDownButton, false);
        Database.GetMyBoards();
    }
예제 #9
0
    public void GrantCredits(int credits)
    {
        Debug.Log(string.Format("ProcessPurchase: PASS. Gems: '{0}'", credits));

        int currentGems = Identity.GetGems();

        screen.SetGemCountDisplay(currentGems + credits);
        Identity.AddGems(credits);

        StoreResultText.text = "You successfully purchased " + credits.ToString() + " Gems!";
        ActorGameManager.ShowGroup(StoreResultPanelName, true);
    }
예제 #10
0
    IEnumerator ShowBeginnerBoards()
    {
        yield return(null);

        Debug.LogWarning("Showing Story Boards for BoardList");
        State.gameBoardCategory = GameBoardCategory.campaign;
        State.gameBoardMine     = false;
        State.gameSource        = GameSource.local;
        State.gameActivity      = GameActivity.play;
        ActorGameManager.ShowGroup(pageUpButton, false);
        ActorGameManager.ShowGroup(pageDownButton, false);
        Database.GetLocalBoards();
    }
예제 #11
0
 void Update()
 {
     if (State.gameState == GameState.boardList)
     {
         // the board list has been returned
         // so the board buttons can be built now
         // set the state back to boards to prevent re-building
         State.gameState = GameState.boards;
         Debug.LogWarning("Boardlist returned, building board buttons...");
         ActorGameManager.ShowGroup(yardButtonsPanelTag, State.gameSource == GameSource.remote);
         StartCoroutine("BuildBoardButtons", State.gameBoardList);
     }
 }
예제 #12
0
    public void GetHint()
    {
        if (Identity.GetGems() < 1)
        {
            ActorGameManager.ShowGroup(getHintPanel, true);

            // Send Analytics Event
            Analytics.CustomEvent("Funnel", new Dictionary <string, object>
            {
                { State.GetBoardDisplayName(), 1 },
                { "HintOutOfGems", 1 }
            });
        }
        else
        {
            ActorGameManager.ShowHint();
        }
    }
예제 #13
0
    private void Start()
    {
        audioManager = GameObject.FindGameObjectWithTag("AudioManager").GetComponentInChildren <ActorAudioManager>();
        audioManager.playScreenLoaded();

        // only show voting button when the board is not mine
        ActorGameManager.ShowGroup(voteForBoardButton, !State.gameBoardMine);

        // update sub-panels based on activity
        UpdateSubPanels();

        // only show the social buttons when the player is age 15 or older
        ActorGameManager.ShowGroup(twitterButton, State.GetAgeFifteenOrOlder());
        ActorGameManager.ShowGroup(facebookButton, State.GetAgeFifteenOrOlder());

        Language.TranslateScreen();

        // set board name
        GameObject.Find(boardNameText).GetComponent <Text>().text = State.GetBoardDisplayName();

        // cache board number
        boardNumber = State.GetBoardNumber();
    }
예제 #14
0
 public void ShowHelp()
 {
     ActorGameManager.ShowGroup(helpPanelName, true);
     ScrollToTop(helpScrollView);
 }
예제 #15
0
 public void PurchaseFailed()
 {
     StoreResultText.text = "Your purchase was not successful.";
     ActorGameManager.ShowGroup(StoreResultPanelName, true);
 }
예제 #16
0
 public void GoNextBoard()
 {
     ActorGameManager.ShowGroup(nextBoardButton, false);
     ActorGameManager.GoNextBoard();
     StartCoroutine("LoadLevel", "play");
 }
예제 #17
0
 public void HideHelp()
 {
     ActorGameManager.ShowGroup(helpPanelName, false);
 }
예제 #18
0
 public void VoteForBoard()
 {
     ActorGameManager.ShowGroup(voteForBoardButton, false);
     Database.AddBoardMetric(metricType.vote);
 }
예제 #19
0
 public void HideFoundTrinketPanel()
 {
     ActorGameManager.ShowGroup(ActorGameManager.foundTrinketPanel, false);
 }
예제 #20
0
 public void CloseStoryView()
 {
     ActorGameManager.ShowGroup("StoryScrollView", false);
 }
예제 #21
0
 public void StoryNow()
 {
     ActorGameManager.ShowGroup(storyUnlockPanel, false);
     StartCoroutine("LoadLevel", "chapters");
 }
예제 #22
0
 public void StoryLater()
 {
     ActorGameManager.ShowGroup(storyUnlockPanel, false);
 }
예제 #23
0
 public void ResultPanelOk()
 {
     ActorGameManager.ShowGroup(StoreResultPanelName, false);
 }
예제 #24
0
 public void ShowSaveBoard()
 {
     ActorGameManager.ShowGroup(saveBoardPanelName, true);
     ActorGameManager.ShowGroup(helpPanelName, false);
 }
 public void ShowChapter(string chapterName)
 {
     ActorGameManager.ShowGroup("StoryScrollView", true);
     storyText.text = Database.GetChapterText(chapterName);
     StartCoroutine("ScrollToTop");
 }