コード例 #1
0
        public FirstContactManager()
        {
            if (!Application.isEditor)
            {
                // Force debug options to FALSE if we're not in the editor
                FORCE_FIRST_CONTACT_START = false;
            }

            // Define the first contact sequence
            // Phases in the sequence can be unlocked one after the other, so that when the previous one is completed we can start the next one
            phasesSequence = new List <FirstContactPhase>
            {
                FirstContactPhase.Intro,
                FirstContactPhase.Reward_FirstBig,

                FirstContactPhase.AnturaSpace_TouchAntura,
                FirstContactPhase.AnturaSpace_Customization,
                FirstContactPhase.AnturaSpace_Exit,

                FirstContactPhase.Map_PlayFirstSession,

                FirstContactPhase.AnturaSpace_Shop,

                FirstContactPhase.Finished
            };

            // Default state
            state = new FirstContactState();
        }
コード例 #2
0
        /// <summary>
        /// Charge this with PlayerProfileData.
        /// </summary>
        public PlayerProfile FromData(PlayerProfileData _data)
        {
            Uuid = _data.Uuid;

            AvatarId                       = _data.AvatarId;
            Age                            = _data.Age;
            Gender                         = _data.Gender;
            Tint                           = _data.Tint;
            IsDemoUser                     = _data.IsDemoUser;
            HasFinishedTheGame             = _data.JourneyCompleted;
            HasFinishedTheGameWithAllStars = _data.HasFinishedTheGameWithAllStars();
            ProfileCompletion              = _data.ProfileCompletion;
            TotalNumberOfBones             = _data.TotalBones;

            HasMaxStarsInCurrentPlaySessions = _data.GetAdditionalData().HasMaxStarsInCurrentPlaySessions;
            ConsecutivePlayDays = _data.GetAdditionalData().ConsecutivePlayDays;
            CurrentShopState    = AnturaSpace.ShopState.CreateFromJson(_data.GetAdditionalData().CurrentShopStateJSON);
            FirstContactState   = JsonUtility.FromJson <FirstContactState>(_data.FirstContactStateJSON);

            SetCurrentJourneyPosition(_data.GetCurrentJourneyPosition(), false);
            SetMaxJourneyPosition(_data.GetMaxJourneyPosition(), false);
            // Antura customization save only customization data
            jsonAnturaCustomizationData = _data.CurrentAnturaCustomization;

            return(this);
        }
コード例 #3
0
        public void InitialiseForCurrentPlayer(FirstContactState _state)
        {
            this.state = _state;

            // Default state
            if (state == null || state.phaseStates.Length == 0)
            {
                state = new FirstContactState();
                ResetSequence();
                AppManager.I.Player.FirstContactState = state;
            }

            if (FORCE_FIRST_CONTACT_START)
            {
                ForceToPhaseInSequence(FORCED_FIRST_CONTACT_START_PHASE);
            }
        }