Beispiel #1
0
    private bool checkIfCreep()
    {
        Location currentLocation = mySceneCatalogue.getCurrentLocation();

        if (pastLocation != null && (currentLocation.interiorName != "Apartment" || !mySceneCatalogue.getIsInInteriorScene()))
        {
            if (currentLocation.locationName == pastLocation.locationName && mySceneCatalogue.getIsInInteriorScene() == pastInteriorStatus)
            {
                creepAmount++;
            }
            else
            {
                creepAmount = 0;
            }
        }

        if (creepAmount >= 5)
        {
            creepAmount = 0;
            return(true);
        }

        pastLocation       = currentLocation;
        pastInteriorStatus = mySceneCatalogue.getIsInInteriorScene();
        return(false);
    }
Beispiel #2
0
 private Texture2D getNextBackground()
 {
     if (mySceneCatalogue.getIsInInteriorScene() == true)
     {
         return(dateBackgroundsForThisScene()[myTimeLord.timeStep % 3]);
     }
     return(backgroundsForThisScene()[myTimeLord.timeStep % 3]);
 }
 private void checkStartDate()
 {
     if (myGameState.currentGameState == GameState.gameStates.PROWL)
     {
         if (mySceneCatalogue.getIsInInteriorScene())
         {
             if (hasDateAtPresentTimeInPresentLocationAndDateNotOver())
             {
                 isAtDate = true;
                 myAudioConductor.startMusic(mySceneCatalogue.getCurrentSceneName(), myTimelord.getCurrentModulusTimestep());
                 myGameState.currentGameState = GameState.gameStates.DATEINTRO;
                 myEventQueue.queueEvent(new EventDateStart());
                 DateableCharacter datePartner = this.getDatePartner(mySceneCatalogue.getCurrentLocation(), myTimelord.getCurrentTimestep());
                 datePartner.dateCount++;
             }
         }
     }
 }
Beispiel #4
0
    private void updateUIComponentsForState(GameState.gameStates currentState)
    {
        this.deactivateUIComponents();

        if (currentState == GameState.gameStates.COMMANDSEQUENCE)
        {
            mainPanel.SetActive(true);
            characterPanel.gameObject.SetActive(true);
            sequenceButtonsPanel.SetActive(true);
            updatePotentialPartnersSprites(myDialogueManager.getAllCurrentLocalPresentConversationPartners());
        }
        else if (currentState == GameState.gameStates.CUTSCENE)
        {
            updateUIForCutSceneState();
        }
        else if (currentState == GameState.gameStates.PROWL)
        {
            mainPanel.SetActive(true);
            mainPanelButtonsPanel.SetActive(true);
            mapButton.SetActive(!mySceneCatalogue.getIsInInteriorScene());
            characterPanel.gameObject.SetActive(true);

            toggleMainPanelIfUIEnabled(mapPanel, this.mapEnabled);
            toggleMainPanelIfUIEnabled(journalPanel, this.journalEnabled);

            if (mainPanel.activeSelf == true)
            {
                myAnimationMaestro.writeDescriptionText(mySceneCatalogue.getLocationDescription(), textPanel);
                updatePotentialPartnersSprites(myDialogueManager.getAllCurrentLocalPresentConversationPartners());
                updateSelectedPartnerButtonUI();
                updateToggleInteriorButtonUI();
            }
        }
        else if (currentState == GameState.gameStates.CONVERSATION)
        {
            dialoguePanel.SetActive(true);
            characterPanel.gameObject.SetActive(true);
            Image speakerPortrait = GameObject.Find("SpeakerPortrait").GetComponent <Image>();
            speakerPortrait.sprite = BackgroundSwapper.createSpriteFromTex2D(myConversationTracker.currentConversation.speaker.portrait);
            askOnDateButton.SetActive(myConversationTracker.canAskOnDateEnabled());
        }
        else if (currentState == GameState.gameStates.DATEINTRO)
        {
            mainPanel.SetActive(true);
            dateButtonsPanel.SetActive(myRelationshipCounselor.isAtDate);
            dateActionButton.SetActive(!myRelationshipCounselor.getDateAbandonedOrExperienced());
            dateActionButton.GetComponentInChildren <Text>().text = mySceneCatalogue.getCurrentLocation().currentDateAction;
            characterPanel.gameObject.SetActive(true);
            updatePotentialPartnersSprites(new List <Character>()
            {
                myRelationshipCounselor.getDatePartner(mySceneCatalogue.getCurrentLocation(), myTimelord.getCurrentTimestep())
            });
            myAnimationMaestro.writeDescriptionText(mySceneCatalogue.getCurrentLocation().descriptionDate, textPanel);
        }
        else if (currentState == GameState.gameStates.DATE)
        {
            mainPanel.SetActive(true);
            dateButtonsPanel.SetActive(myRelationshipCounselor.isAtDate);
            dateActionButton.SetActive(!myRelationshipCounselor.getDateAbandonedOrExperienced());
            dateActionButton.GetComponentInChildren <Text>().text = mySceneCatalogue.getCurrentLocation().currentDateAction;
            characterPanel.gameObject.SetActive(true);
            updatePotentialPartnersSprites(new List <Character>()
            {
                myRelationshipCounselor.getDatePartner(mySceneCatalogue.getCurrentLocation(), myTimelord.getCurrentTimestep())
            });
        }
        else if (currentState == GameState.gameStates.DATECUTSCENE)
        {
            mainPanel.SetActive(true);
            characterPanel.gameObject.SetActive(true);
            sequenceButtonsPanel.SetActive(true);
            updatePotentialPartnersSprites(GameObject.FindObjectOfType <CommandBuilder>().dateCutSceneCharList);
        }
        else if (currentState == GameState.gameStates.DATEOUTRO)
        {
            mainPanel.SetActive(true);
            dateButtonsPanel.SetActive(true);
            dateActionButton.SetActive(!myRelationshipCounselor.getDateAbandonedOrExperienced());
            myAnimationMaestro.writeDescriptionText("One good date can change your life.", textPanel);
        }
    }
 private bool isCharacterPresentAtCurrentLocation(Character character, int timeOfDayToCheck)
 {
     if (character.locations[timeOfDayToCheck].locationName.ToLower().Equals(mySceneCatalogue.getCurrentSceneName().ToLower()) && character.locations[timeOfDayToCheck].isInside.Equals(mySceneCatalogue.getIsInInteriorScene()))
     {
         return(true);
     }
     return(false);
 }
Beispiel #6
0
 public bool checkTutorialConditionsMet()
 {
     return(tutorialComplete == false && mySceneCatalogue.getIsInInteriorScene() == true && mySceneCatalogue.getCurrentSceneName() == "City" && myTimeLord.getCurrentModulusTimestep() == 0);
 }