Esempio n. 1
0
 public CoughingState(HealthStateMachine stateMachine, ref HealthData data) : base(stateMachine, ref data)
 {
     m_randomizer = new WeightedRandomizer <IState <HealthData> >();
     m_randomizer.AddWeight(new MenuEntry <IState <HealthData>, int>(new DeadState(stateMachine, ref data), m_data.m_config.cDeadWeight));
     m_randomizer.AddWeight(new MenuEntry <IState <HealthData>, int>(new RecoveredState(stateMachine, ref data), 100 - m_data.m_config.cDeadWeight));
 }