public void Remove(LivingEntity ent) { CAA caa = this.controllers.Find(x => x.ctr.entity == ent); caa.ctr.entity.StopAllCoroutines(); this.controllers.Remove(caa); }
private string[] GetCurrentActionsName(CAA caa) { caa.CleanActions(); _all.AddRange(caa.parallelizables); _all.Add(caa.main); string[] result = _all.ConvertAll(new Converter <UtilityAction, string>(UtilityActionToString)).ToArray(); _all.Clear(); return(result); }
public UtilityAction[] GetCurrentActions(LivingEntity ent) { CAA caa = this.caas.Find(x => x.ctr.entity == ent); _all.AddRange(caa.parallelizables); _all.Add(caa.main); UtilityAction[] result = _all.ToArray(); _all.Clear(); return(result); }
public void Remove(LivingEntity ent) { CAA caa = this.caas.Find(x => x.ctr.entity == ent); // Remove from registred caas this.caas.Remove(caa); // Stop all actions caa.StopAllActions(); }
public static CAA Leer_CAA(int refOrganizacion) { try { var command = new MySqlCommand() { CommandText = "leer_CAA", CommandType = System.Data.CommandType.StoredProcedure }; command.Parameters.Add(new MySqlParameter() { ParameterName = "in_refOrganizacion", Direction = System.Data.ParameterDirection.Input, Value = refOrganizacion }); var datos = ContexDb.GetDataSet(command); if (datos.Tables[0].Rows.Count == 1) { System.Data.DataRow row = datos.Tables[0].Rows[0]; var prodData = row; var caa = new CAA() { NomDirCarrera = prodData["nomDirCarrera"].ToString(), Carrera = prodData["carrera"].ToString(), SexoDirCarrera = prodData["sexoDirCarrera"].ToString(), Cargo = prodData["cargo"].ToString() }; return(caa); } } catch (Exception ex) { Console.WriteLine(ex.ToString()); } finally { } return(null); }
protected void AddController(MovementController ctr) { CAA caa = new CAA(ctr); this.caas.Add(caa); }
public static void Main() { CAA o = new CAA(); Console.ReadLine(); }
public UtilityAction GetCurrentAction(LivingEntity ent) { CAA caa = this.controllers.Find(x => x.ctr.entity == ent); return(caa?.act); }