public static FixedStack <T> CreateDefault(T initValue, Action <T, int, T, int> onChanged = null) { FixedStack <T> stack = new FixedStack <T>(6, onChanged); stack.Push(initValue, true); return(stack); }
public void Init(uint ownerID, uint runtimeID, string propName, bool appearAnim = false) { this.config = PropObjectData.GetPropObjectConfig(propName); base.commonConfig = this.config.CommonConfig; this.Init(runtimeID); this._timeScaleStack = new FixedStack <float>(8, null); this._timeScaleStack.Push(1f, true); if ((Singleton <LevelManager> .Instance != null) && (Singleton <LevelManager> .Instance.levelEntity != null)) { this._timeScale = this._lastTimeScale = this._timeScaleStack.value * Singleton <LevelManager> .Instance.levelEntity.TimeScale; } else { this._timeScale = this._lastTimeScale = this._timeScaleStack.value; } if (Singleton <EventManager> .Instance != null) { this.owner = (BaseMonoAbilityEntity)Singleton <EventManager> .Instance.GetEntity(ownerID); } if ((this.config.PropArguments != null) && !this.config.PropArguments.IsTargetable) { base.SetCountedDenySelect(true, true); } if ((this.config.PropArguments != null) && (this.config.PropArguments.Duration > 0f)) { base.StartCoroutine(this.WaitDestroyByDuration(this.config.PropArguments.Duration)); } if (appearAnim) { this.Appear(); } }
public void InitStageEffectSettings() { AvatarManager instance = Singleton <AvatarManager> .Instance; instance.onLocalAvatarChanged = (Action <BaseMonoAvatar, BaseMonoAvatar>)Delegate.Combine(instance.onLocalAvatarChanged, new Action <BaseMonoAvatar, BaseMonoAvatar>(this.OnLocalAvatarChanged)); this._stageEffectSettingStack = new FixedStack <ConfigStageEffectSetting>(7, new Action <ConfigStageEffectSetting, int, ConfigStageEffectSetting, int>(this.OnStageEffectSettingChanged)); this._stageEffectSettingStack.Push(ConfigStageEffectSetting.EMPTY, true); }
protected void Awake() { base._runtimeID = 0x21800001; this._timeScaleStack = new FixedStack <float>(8, null); this._timeScaleStack.Push(1f, true); this._auxTimeScaleStack = new FixedStack <float>(8, new Action <float, int, float, int>(this.OnAuxTimeScaleChanged)); this._auxTimeScaleStack.Push(1f, true); }
private void CommonInit(StageEntry stageEntry) { this.InitWindZone(); this.InitLightProb(); this.InitLightMapCorrection(); Singleton <StageManager> .Instance.SetBaseStageEffectSetting(stageEntry.StageEffectSetting); Singleton <StageManager> .Instance.SetBaseStageEffectSetting(this._subWeatherStack.value.weather.stageEffectSetting); FixedStack <float> auxTimeScaleStack = Singleton <LevelManager> .Instance.levelEntity.auxTimeScaleStack; auxTimeScaleStack.onChanged = (Action <float, int, float, int>)Delegate.Combine(auxTimeScaleStack.onChanged, new Action <float, int, float, int>(this.AuxTimeScaleCallback)); }
public virtual void Awake() { this._renderingDataStack = new FixedStack <RenderingDataTransition>(10, new Action <RenderingDataTransition, int, RenderingDataTransition, int>(this.OnRenderingDataChanged)); this._currentRendertingData = null; this._renderingDataTransitionTimer = new EntityTimer(0f); this._renderingDataTransitionTimer.SetActive(false); this._renderingDataState = RenderingDataState.Idle; this._mainCameraTransform = Camera.main.transform; this._subWeatherStack = new FixedStack <SubWeatherTransition>(5, new Action <SubWeatherTransition, int, SubWeatherTransition, int>(this.OnSubWeatherChanged)); this._rainPrefab = Miscs.LoadResource <GameObject>(this.RAIN_PREFAB_PATH, BundleType.RESOURCE_FILE); this._weatherState = WeatherState.Idle; this._weatherTransitionTimer = new EntityTimer(0f); this._weatherTransitionTimer.SetActive(false); }