public void DeleteSelf() { int index = transform.GetSiblingIndex(); transform.parent = null; parentOfParent.UpdatePoints(); Destroy(gameObject); }
/* Info * * SIMETRÍA = 100 - ((100 * Mathf.Abs(Pr - Pl)) / (0.5 * Mathf.Abs(Pr + Pl))) * * Pr y Pl son los parametros temporales para cada miembro * * Velocidad: distancia recorrida en la caminata en una unidad de tiempo y en la dirección de la marcha. * Cadencia: número de pasos realizados en un minuto. * * Tiempo de ciclo: tiempo que transcurre entre dos eventos iguales del ciclo. Mismo Evento y Mismo Pie. * Tiempo de apoyo: tiempo que transcurre entre el contacto y el despegue * Tiempo de vuelo: tiempo que transcurre entre el despegue y el contacto * Tiempo de paso: tiempo que transcurre entre apoyo de un pie y apoyo del pie contrario. * */ private void Awake() { pointer = GetComponent <Pointers2DScript>(); points = new List <Point2D>(); CIpoints_L = new List <Point2D>(); CIpoints_R = new List <Point2D>(); DPpoints_L = new List <Point2D>(); DPpoints_R = new List <Point2D>(); // calculations lists cycleTime_L = new List <float>(); cycleTime_R = new List <float>(); stepTime_L = new List <float>(); stepTime_R = new List <float>(); flyTime_L = new List <float>(); flyTime_R = new List <float>(); passingTime_L = new List <float>(); passingTime_R = new List <float>(); pointer.UpdatePoints(); UpdatePoints(); }
public void ChangeFoot() { if (point2D.foot == Foot.left) { point2D.foot = Foot.right; footImg.sprite = sprites.Find(x => x.name == "FootR"); arrows[0].color = rightColor; arrows[1].color = rightColor; } else if (point2D.foot == Foot.right) { point2D.foot = Foot.left; footImg.sprite = sprites.Find(x => x.name == "FootL"); arrows[0].color = leftColor; arrows[1].color = leftColor; } print(transform.parent.transform.parent.GetComponent <Pointers2DScript>()); parentOfParent = transform.parent.transform.parent.GetComponent <Pointers2DScript>(); parentOfParent.UpdatePoints(); }