void Start()
    {
        RecordIndicator.gameObject.SetActive(false);
        if (Managers.Game.Preferences.EnableReplay)
        {
            ReplayControl.ActivateReplay();
        }
        else
        {
            ReplayControl.DeActivateReplay();
        }

        Messenger.AddListener(Globals.GameEvents.MemekoLaunching, () => FSMGameLogic.RaiseEvent("Playing"));
        Messenger.AddListener(Globals.GameEvents.PauseGame, () => FSMGameLogic.RaiseEvent("Pause"));
        Messenger.AddListener(Globals.GameEvents.ResumeGame, OnResumeGame);
        Messenger.AddListener(Globals.GameEvents.RetryButtonPressed, OnExitScene);
        Messenger.AddListener(Globals.GameEvents.BackButtonPressed, OnExitScene);


        starttime     = Time.time;
        globalSeconds = 0;

        CurrenTopScore = Managers.GameData.GetLevelTopScore(Managers.Game.Preferences.CurrentPackName,
                                                            Managers.Game.Preferences.CurrentLevelName, Managers.Game.Preferences.GameType);


        //Load the level from the pack-#.xml the base class has the implementation
        base.LoadLevelObjects();
        MAXTURNS = Managers.Game.CurrentLevelXmlInfo.Maxturns;
        //  Messenger.AddListener(CurrentMemeko.gameObject.GetInstanceID() + "EnterSelected", () => FSMGameLogic.RaiseEvent("Selecting"));
        Messenger.AddListener(CurrentMemeko.gameObject.GetInstanceID() + "EnterSelected", () => FSMGameLogic.RaiseEvent("Selecting"));

        Messenger.AddListener(CurrentMemeko.gameObject.GetInstanceID() + "UnSelectPlayer", () => FSMGameLogic.RaiseEvent("ReadyToPlay"));
    }
 private void OnEnteringSelect()
 {
     /*  if (Managers.Game.Preferences.EnableReplay)
      * {
      *    ReplayControl.StopRecording();
      *
      *    ReplayControl.StartRecording();
      *
      *    ShowRecordIndicator(true);
      * } */
     FSMGameLogic.RaiseEvent("Selecting");
 }
    void RefreshGameTime()
    {
        timeLeft = (int)(endTime - Time.time);


        if (timeLeft <= 0)
        {
            FSMGameLogic.RaiseEvent("OutOfTime");
            timeLeft = 0;
        }
        if (LabelTime != null)
        {
            LabelTime.text = timeLeft.ToString();
        }
    }