public IJsonObject GetJsonObject() { JsonDrugAffect drugAffect = new JsonDrugAffect(); drugAffect.IsAcitve = isAcive; drugAffect.LifeTime = lifeTime; return drugAffect; }
private void BuildAffector(JsonDrugAffect? jsonDrugAffect) { if (jsonDrugAffect.HasValue) DrugAffector.Initialize(level, jsonDrugAffect.Value); else DrugAffector.Initialize(level); }
public static void Initialize(GameLevel level, JsonDrugAffect drugAffect) { _i = new DrugAffector(level); _i.isAcive = drugAffect.IsAcitve; if (drugAffect.LifeTime > 0) _i.IncreaseAffectTime(drugAffect.LifeTime); }