コード例 #1
0
 public static void Invoke()
 {
     GameInfo.State = GameState.Startup;
     EventListenerDataBlock.Load();
     EventsDataBlock.Load();
     EventSequenceDataBlock.Load();
     LightSequenceDataBlock.Load();
     LightStateDataBlock.Load();
     ExpeditionSettingsDataBlock.Load();
 }
コード例 #2
0
        public void ChangeState(LightStateDataBlock data, float extraTime = 0f)
        {
            if (this.currentState != null && !this.currentState.moveToNextState)
            {
                this.currentState.ForceEnd();
            }

            if (data != null)
            {
                this.currentState = new LightState(data, this);
                this.currentState.Init(extraTime);
            }
            else
            {
                this.currentState = null;
            }
        }
コード例 #3
0
        public LightState(LightStateDataBlock data, LightController controller)
        {
            if (data == null)
            {
                throw new System.ArgumentNullException(nameof(data));
            }

            this.Controller = controller;

            this.m_nextState = LightStateDataBlock.GetBlock(data.NextStateID);

            this.m_transitionTime  = Random.Range(data.MinTransitionTime, data.MaxTransitionTime);
            this.m_nextStateTime   = Random.Range(data.MinNextStateTime, data.MaxNextStateTime);
            this.m_activationDelay = Random.Range(data.MinActivationDelay, data.MaxActivationDelay);

            this.m_color = data.ChangeColor ? data.Color : controller.GetCurrentColor();

            if (data.ChangeIntensity)
            {
                this.m_intensity = Random.Range(data.MinIntensity, data.MaxIntensity);

                if (data.RelativeIntensity)
                {
                    if (data.RelativeToStartIntensity)
                    {
                        this.m_intensity *= controller.StartIntensity;
                    }
                    else
                    {
                        this.m_intensity *= controller.GetIntensity();
                    }
                }
            }
            else
            {
                this.m_intensity = controller.GetIntensity();
            }

            this.m_lightAnimatorEnabled = data.LightAnimatorEnabled;
        }