public ActionTimer(float inc, float max = 1f, bool reset = true) { this._inc = inc; this._max = max; this._reset = reset; AutoUpdatables.Add((IAutoUpdate) this); }
public EdoMain() { //static initialization for SFX replacement definitions //these still need to be runtime due to mod paths. //if these get big enough they will cause lag on game entry, //so they will need to be moved to EdoMod.cs // //values are based on 10-game, 4-player sessions. (3 deaths * 10 rounds = 30 deaths/session avg.) _sfxr["death"] = new[] { Tuple.Create(2f / 30f, Mod.GetPath <EdoMod>("SFX\\RobloxDeath")), //2 per session Tuple.Create(1f / 120f, Mod.GetPath <EdoMod>("SFX\\RobloxDeathSlow")) //1 per 4 sessions }; //some stuff left over from UFFMod a long time age; should probably be cleaned up but I'm too lazy teamSpawnsDone = new Dictionary <TeamHat, Cape>(); //here so this gets added to the list of things to update each frame AutoUpdatables.Add(this); //because many things are effectively static, but AutoUpdatables requires this to be an object for frame updates instance = this; if (ModSettings.enableDangerousInjections) { //create a pointer to the '_sounds' field in the SFX class. FieldInfo sounds = typeof(SFX).GetField("_sounds", BindingFlags.Static | BindingFlags.NonPublic); _sounds = (Dictionary <string, SoundEffect>)sounds.GetValue(null); //store a backup of the intended sfx's foreach (string key in _sfxr.Keys) { _sounds_bak[key] = _sounds[key]; } //_sounds["shotgunFire2"] = _sounds[Mod.GetPath<EdoMod>("SFX\\MansNotQuack")]; } DuckGame.DevConsole.Log(ModLoader.currentModLoadString, Color.White); }
//public PublicGameMode access; public StateMachine() { AutoUpdatables.Add(this); }
internal Effector(Effect itsEffect) { ItsEffect = itsEffect; AutoUpdatables.Add(this); }
public KillCounter(StateMachine s) { AutoUpdatables.Add(this); this.stateMachine = s; }
public KillCounter() { AutoUpdatables.Add(this); this.stateMachine = new StateMachine(); }