void EndCurrentPuzzle()
    {
        if (CurPuzzle == Puzzles.Length - 1)
        {
            base.PlayFirstBranch();
            Slot_Container sc         = ArticyDatabase.GetObject <Slot_Container>("Start_On_Object");
            ArticyObject   curStartOn = sc.Template.Slot_Feature.Slot_Feature_Slot;
            var            a          = curStartOn as IObjectWithFeatureSlot_Feature;
            if (a != null)
            {
                sc.Template.Slot_Feature.Slot_Feature_Slot = a.GetFeatureSlot_Feature().Slot_Feature_Slot;
            }
            else
            {
                Debug.LogError("no slot feature in EndCurrentPuzzle");
            }

            SceneManager.LoadScene(1);
            // SceneManager.LoadScene(1);
        }
        else
        {
            Puzzles[CurPuzzle].gameObject.SetActive(false);
            CurPuzzle++;
            Puzzles[CurPuzzle].gameObject.SetActive(true);
            SetupLerpFade(1f, 0f, 1.5f);
            GameState = eGameState.FADE_IN;
        }
    }
    // Start is called before the first frame update
    public virtual void Start()
    {
        PlayerCharacter PC = ArticyDatabase.GetObject <PlayerCharacter>("Player_Character_Entity_Tech_Name");

        //Debug.Log("Our player name is: " + PC.Template.Basic_Character_Attributes.NPC_Feature_Name);
        StaticStuff.FlowDebug("Our player name is: " + PC.Template.Basic_Character_Attributes.NPC_Feature_Name);

        FlowPlayer = GetComponent <ArticyFlowPlayer>();
        Slot_Container sc = ArticyDatabase.GetObject <Slot_Container>("Start_On_Object");

        if (sc.Template.Slot_Feature.Slot_Feature_Slot != null)
        {
            //Debug.Log("CaptainsChairSceneRoot.Start() setting StartOn: " + sc.Template.Slot_Feature.Slot_Feature_Slot.name);
            StaticStuff.FlowDebug("CaptainsChairSceneRoot.Start() setting StartOn: " + sc.Template.Slot_Feature.Slot_Feature_Slot.name);
            SetFlowPlayerStartOn(sc.Template.Slot_Feature.Slot_Feature_Slot);
        }
        else
        {
            //Debug.Log("CaptainsChairSceneRoot.Start() no StartOn");
            StaticStuff.FlowDebug("CaptainsChairSceneRoot.Start() no StartOn");
        }

        if (DialogueUI != null)
        {
            DialogueUI.gameObject.SetActive(false);
        }
        //FlowPlayer.StartOn = sc.Template.Slot_Feature.Slot_Feature_Slot;
    }
Example #3
0
    public void OnBranchesUpdated(IList <Branch> aBranches)
    {
        if (aBranches == null || aBranches.Count == 0)
        {
            Debug.LogWarning("NULL or 0 branches in OnBranchesUpdated()."); return;
        }
        Debug.Log("Num branches: " + aBranches.Count);

        int branchID = Random.Range(0, aBranches.Count);

        branchID = 0; // normally this would be random but for now just go to the Ship
        Branch         branch        = aBranches[branchID];
        ArticyObject   targetObject  = (ArticyObject)branch.Target;
        Slot_Container slotContainer = ArticyDatabase.GetObject <Slot_Container>("Start_On_Object");

        slotContainer.Template.Slot_Feature.Slot_Feature_Slot = targetObject;
    }
    protected void GoToMiniGame(Branch branch)
    {
        var miniGameFrag = branch.Target as IObjectWithFeatureMini_Game_Name;

        if (miniGameFrag != null)
        {
            //Debug.Log("go to this mini game NOW: " + miniGameFrag.GetFeatureMini_Game__Name().Mini_Game_Name);
            StaticStuff.FlowDebug("go to this mini game NOW: " + miniGameFrag.GetFeatureMini_Game_Name().Mini_Game_Name);
            // FlowPlayer.StartOn = branch.Target as IArticyObject;
            Slot_Container slotContainer = ArticyDatabase.GetObject <Slot_Container>("Start_On_Object");
            slotContainer.Template.Slot_Feature.Slot_Feature_Slot = (ArticyObject)branch.Target;
            SceneManager.LoadScene(miniGameFrag.GetFeatureMini_Game_Name().Mini_Game_Name);
        }
        else
        {
            //Debug.LogError("ERROR: trying to go to a mini game with no name");
            StaticStuff.FlowDebug("ERROR: trying to go to a mini game with no name");
        }
    }