public int GetSpeedMult(int generatorId) { if (!SpeedMults.ContainsKey(generatorId)) { SpeedMults.Add(generatorId, 1); } return(SpeedMults[generatorId]); }
private void MultSpeed(int generatorId, int val) { if (!SpeedMults.ContainsKey(generatorId)) { SpeedMults.Add(generatorId, 1); } SpeedMults[generatorId] *= val; UniRx.MessageBroker.Default.Publish <SpeedMultChangedArgs>(new SpeedMultChangedArgs { SpeedModifier = this, Name = "secretary", GeneratorId = generatorId }); }