/// <summary> /// Sets the parameter for the behaviour. This specific overload of the function is used for wandering and patrolling /// </summary> /// <param name="target"></param> The gameobject reference of the moving target public void SetParameters(TargetSetter targetSetter, float speed, string behaviourName = "", UnityEvent behaviourEvent = null) { m_targetSetter = targetSetter; m_isMovingTarget = false; m_behaviourName = behaviourName; m_speed = speed; m_behaviourEvent = behaviourEvent; }
private void Awake() { _unitMover = new UnitMover(transform, GetComponent <Rigidbody>()); _unitAttacker = GetComponent <UnitAttacker>(); _targetSetter = new TargetSetter(transform); _navMeshAgent = GetComponent <NavMeshAgent>(); }
public static void SaveConfiguration(List <string> configs) { TargetSetter.Open(CONFIG_FILE); try { TargetSetter.GenerateFile(configs); } finally { TargetSetter.Close(); } }
private static void ProcessATarget(string target, List <string> parms) { string siteId = ListParser.Get("SITE-ID=", parms); string serviceUrl = ListParser.Get("SERVICE-URL=", parms); string servicePort = ListParser.Get("SERVICE-PORT=", parms); string crmUrl = ListParser.Get("CRM-URL=", parms); string crmPort = ListParser.Get("CRM-PORT=", parms); TargetSetter.Open(target); try { TargetSetter.Replace(BuildUrl(serviceUrl, servicePort, "0"), BuildUrl(serviceUrl, servicePort, siteId)); TargetSetter.Replace(BuildUrl(crmUrl, crmPort, "0"), BuildUrl(crmUrl, crmPort, siteId)); } finally { TargetSetter.Close(); } }