private Impact CreateBehaviourImpact(ImpactInfo info_) { BehaviourImpactData data = Main.Inst.Data.Get <BehaviourImpactData>(info_.impactObjectId); BehaviourImpact behaviourImpact = new BehaviourImpact(data); return(behaviourImpact); }
public override IBaseData Create(string jsonString_) { //first override all simple type fields... BehaviourImpactData data = DefaultJsonFactory.Create <BehaviourImpactData>(jsonString_); //...and then more complex fields JSONObject jo = new JSONObject(jsonString_); //targetTypes data.targetTypes = GetStringArray(jo, "targetTypes"); return(data); }
public IBaseComponent Create(BehaviourImpactData data_) { if (_factoryFuncs.ContainsKey(data_.behaviourType)) { return(_factoryFuncs[data_.behaviourType].Invoke(data_)); } else { Debug.LogError(GetType().Name + " -> can't create item of type :" + data_.behaviourType); return(null); } }
private IBaseComponent CreateGuidedBehaviour(BehaviourImpactData impactData_) { return(new GuidedBehaviuorComponent()); }
public BehaviourImpact(BehaviourImpactData behaviourImpactData_) { _behaviourImpactData = behaviourImpactData_; targetTypes = _behaviourImpactData.targetTypes; _timerData = Main.Inst.Data.Get <TimerData>(_behaviourImpactData.timerId); }