示例#1
0
    public void TriggerLevelSimulation(LinkJava.SimulationFeedback feedback)
    {
        LinkJava.OnSimulationCompleted -= TriggerLevelSimulation;

        PlayerInteraction_GamePhaseBehavior castBehavior = (PlayerInteraction_GamePhaseBehavior)playerInteractionBehavior;

        //none indicates hitting the replay button
        if (feedback != LinkJava.SimulationFeedback.none)
        {
            //Debug.Log("Feedback from LinkJava to GameManager was " + feedback.ToString());
            castBehavior.StartSimulation();
        }

        if (feedback == LinkJava.SimulationFeedback.success || feedback == LinkJava.SimulationFeedback.none)
        {
            castBehavior.StartSimulation();
        }

        else if (feedback == LinkJava.SimulationFeedback.failure)
        {
            castBehavior.playerInteraction_UI.loadingOverlay.ClosePanel();
            PlayerInteraction_GamePhaseBehavior playerInteraction = playerInteractionBehavior as PlayerInteraction_GamePhaseBehavior;
            playerInteraction.EndSimulation();
            castBehavior.playerInteraction_UI.simulationErrorOverlay.OpenPanel();
        }
    }
示例#2
0
    public void PlayTutorialLevel()
    {
        string levelToString = SerializeCurrentLevel();
        //Debug.Log(levelToString);
        string filename =
            linkJava.savePath
            + Constants.FilePrefixes.inputLevelFile + "_PLAY_"
            + System.DateTime.Now.ToString("yyyyMMddHHmmss") + ".txt";

        linkJava.simulationMode = LinkJava.SimulationTypes.Play;
        GameManager.Instance.tracker.CreateEventExt("SubmitCurrentLevel" + "PLAY", filename);

        PlayerInteraction_GamePhaseBehavior castBehavior = (PlayerInteraction_GamePhaseBehavior)playerInteractionBehavior;

        castBehavior.StartSimulation();
    }
    public void TriggerLevelSimulation(LinkJava.SimulationFeedback feedback)
    {
        LinkJava.OnSimulationCompleted -= TriggerLevelSimulation;

        //none indicates hitting the replay button
        if (feedback != LinkJava.SimulationFeedback.none)
        {
            Debug.Log("Feedback from LinkJava to GameManager was " + feedback.ToString());
        }

        PlayerInteraction_GamePhaseBehavior castBehavior = (PlayerInteraction_GamePhaseBehavior)playerInteractionBehavior;

        if (feedback == LinkJava.SimulationFeedback.success)
        {
            castBehavior.StartSimulation();
        }
        else
        {
            castBehavior.playerInteraction_UI.simulationErrorOverlay.OpenPanel();
        }
    }