Пример #1
0
 void MapChoice(MapEvent eventdata)
 {
     if (LimitedDailyAccess)
     {
         if (eventdata.Destination == gameObject.GetComponent <MapButton>().Location)
         {
             Game.current.Progress.SetValue <int>(HourVisited, Game.current.Hour);
             Game.current.Progress.SetValue <int>(DayVisited, Game.current.Day);
             Game.current.Progress.SetValue <int>(AccessPoint, Game.current.Progress.GetIntValue(AccessPoint) + 1);
         }
     }
 }
Пример #2
0
        void OnSelectedRoom(MapEvent eventdata)
        {
            var bloc = Body.colors;

            if (eventdata.Destination == Location && bloc != SelectedColors)
            {
                bloc = SelectedColors;
            }
            else
            {
                bloc = DefaultColors;
            }

            Body.colors = bloc;
        }
Пример #3
0
        public void GotToRoom(MapEvent EventData)
        {
            if (Location == EventData.Destination && gameObject.activeSelf)
            {
                Location = Room.None;
                gameObject.SetActive(false);
                return;
            }

            Location    = EventData.Destination;
            Time        = EventData.Length;
            DrainEnergy = EventData.DrainEnergy;
            AssignText(Location);
            //turn on visiblity
            gameObject.SetActive(true);
        }
Пример #4
0
        void MapChoice(MapEvent eventdata)
        {
            Space.DispatchEvent(Events.Backdrop, new StageDirectionEvent(eventdata.Destination, "", MapTransitions));

            for (int i = 0; i < ChoicesAvalible.Count; ++i)
            {
                if (ChoicesAvalible[i].RoomLocation == eventdata.Destination)
                {
                    Game.current.CurrentRoom = eventdata.Destination;
                    ChoicesAvalible[i].SetSceneTime();
                    TurnMapOff();
                    //gameObject.SetActive(false);
                    Game.current.SetTimeBlock(eventdata.Length, eventdata.DrainEnergy);
                    Space.DispatchEvent(Events.LeaveMap, new DestinationNodeEvent(ChoicesAvalible[i].ID));

                    return;
                }
            }

            //if gets here, no scene was there. send a default sorta dealie
            int multiplier = 1;

            if (AllowTimeDilation && eventdata.DrainEnergy)
            {
                foreach (var multiple in TimeDilation)
                {
                    if (multiple.DepressionValue <= Game.current.Self.GetWellbingStat(Personality.Wellbeing.Depression))
                    {
                        multiplier = multiple.Multiplier;
                    }
                }
            }

            //Game.current.Progress.SetValue("CurrentRoom", eventdata.Destination.ToString());
            Game.current.CurrentRoom = eventdata.Destination;
            //gameObject.SetActive(false);
            TurnMapOff();


            Game.current.InCurrentStory = true;
            Game.current.SetCurrentStory(DefaultActions.name, "StoryFiles/Unconstrained/" + DefaultActions.name); //the one hard coded path


            Game.current.SetTimeBlock(eventdata.Length * multiplier, eventdata.DrainEnergy);
            Space.DispatchEvent(Events.NewStory, new StoryEvent(DefaultActions));
        }