//manually add push fields public void TryAdd(PushField otherPush) { if (otherPush == this || otherPush.lineID != this.lineID || overlapList.Contains(otherPush)) return; overlapList.Add(otherPush); }
public override void Start() { base.Start(); moveVector = new Vector3(0, 0, 0); cooldownTime = 0.55f; gc.OnJumpPadActivate += HandleJumpPad; dashParticles.emit = false; girlPushField = GetComponentInChildren<PushField>(); }
//manually remove push fields public void TryRemove(PushField otherPush) { overlapList.Remove(otherPush); }
//are we moving a similar velocity? private bool SimilarVelocity(PushField other) { float myVelo = baseController.TotalVeloX; float otherVelo = other.transform.parent.GetComponent<BaseController>().TotalVeloX; if (Mathf.Abs(myVelo - otherVelo) <= 0.5f) { return true; } else { return false; } }