//To put it simple: IFlowObject is the basic type of anything the FlowPlayer can encounter while traversing..
    // That means every node, every pin and every connection is also an IFlowObject.If for some reason the passed
    // aObject is null, we have encountered a Dead End.
    protected override void DoOnFlowPlayerPaused(IFlowObject aObject)
    {
        // Debug.Log("**********************************************************************DoOnFlowPlayerPaused()");
        //Debug.Log("OnFlowPlayerPaused() IFlowObject Type: " + aObject.GetType() + ", with TechnicalName: " + ((ArticyObject)aObject).TechnicalName);
        StaticStuff.FlowDebug("**********************************************************************DoOnFlowPlayerPaused()");
        StaticStuff.FlowDebug("OnFlowPlayerPaused() IFlowObject Type: " + aObject.GetType() + ", with TechnicalName: " + ((ArticyObject)aObject).TechnicalName);
        CurPauseObject = aObject;
        // Note...a Dialogue Fragment is NOT a Flow Fragment
        var flowFragType = aObject as IObjectWithFeatureFlow_Fragment_Type;

        if (flowFragType != null)
        {
            Flow_Fragment_Type type     = flowFragType.GetFeatureFlow_Fragment_Type().Flow_Fragment_Type;
            FlowFragment       flowFrag = aObject as FlowFragment;
            //Debug.Log("Fragment name: " + flowFrag.DisplayName + ", has text: " + flowFrag.Text);
            //Debug.Log("enum val: " + type);
            StaticStuff.FlowDebug("Fragment name: " + flowFrag.DisplayName + ", has text: " + flowFrag.Text);
            StaticStuff.FlowDebug("enum val: " + type);
        }
        var dialogueFrag = aObject as Dialogue_Fragment;

        if (dialogueFrag != null)
        {
            //Debug.Log("We have a dialogue fragment...so DO SOMETHING");
            StaticStuff.FlowDebug("We have a dialogue fragment...so don't do anything since branch update will set up the dialogue fragment stuff there");
            // monote - "Ship.DoOnFlowPlayerPaused() about to show dialogue fragment"
            //Debug.LogWarning("We're changing the dialogue setup from Pause to BranchesUpdated because we can have more than 1");
            // base.ShowDialogueFragment(dialogueFrag);
        }
        //Debug.Log("**********DoOnFlowPlayerPaused() END");
        StaticStuff.FlowDebug("**********DoOnFlowPlayerPaused() END");
    }
Beispiel #2
0
    public override void InitManager()
    {
        ArticyDatabase.Localization.Language = "en";

        TimeStart = System.DateTime.Now;
        //ResetArticyVariables();

        base.InitManager();
        Application.targetFrameRate = 60;
        QualitySettings.vSyncCount  = 1;



        if (MasterReference.HasReference)
        {
            FlowFragment masterFragment = MasterReference.GetObject <FlowFragment>();

            if (masterFragment != null)
            {
                //Debug.Log("Found master fragment: " + masterFragment.ToString());
                IntroDialogue = masterFragment.Children[0] as Dialogue;
                for (int i = 0; i < masterFragment.OutputPins.Count; ++i)
                {
                    for (int j = 0; j < masterFragment.OutputPins[i].Connections.Count; ++j)
                    {
                        SetCurrentDay(masterFragment.OutputPins[i].Connections[j].Target as template_day);
                    }
                }
            }

            if (GrimReaperPaperworkProfileRef.HasReference)
            {
                GrimReaperPaperworkProfile = GrimReaperPaperworkProfileRef.GetObject <template_profile>();
            }
            if (FatePaperworkProfileRef.HasReference)
            {
                FatePaperworkProfile = FatePaperworkProfileRef.GetObject <template_profile>();
            }

            if (LanzoPaperworkProfileRef.HasReference)
            {
                LanzoPaperworkProfile = LanzoPaperworkProfileRef.GetObject <template_profile>();
            }

            if (PostGameDialogueReference.HasReference)
            {
                PostGameDialogue = PostGameDialogueReference.GetObject <Dialogue>();
            }

            if (PostGameDialogueSubplotReference.HasReference)
            {
                PostGameDialogueSubplot = PostGameDialogueSubplotReference.GetObject <Dialogue>();
            }
        }


        List <ManagerBase> managers = new List <ManagerBase>();

        for (int i = 0; i < ManagerList.Count; ++i)
        {
            ManagerBase newManager = Instantiate(ManagerList[i]);
            managers.Add(newManager);
        }

        for (int i = 0; i < managers.Count; ++i)
        {
            managers[i].InitManager();
        }



        //HUDManager.instance.ToggleHUD(false);
    }