public void FootprintMissed(Footprint f) { Player.Instance.ReportFootprintMissed(); if (f && existingFootprints[0].footprint.GetInstanceID() != f.GetInstanceID()) { Debug.LogError("Footprint clicked not at front of stack"); } for (int i = 0; i < existingFootprints.Count; i++) { FootprintRegister thisFootprint = existingFootprints[i]; if (thisFootprint.zPosition - Player.Instance.transform.position.z < distanceToRemoveFootprintsAfterMissStep) { existingFootprints.RemoveAt(0); i--; Destroy(thisFootprint.footprint.gameObject); } else { break; } } ActivateNextUp(); }
public void PlayerSelectedFootprint(Footprint f) { Player.Instance.ReportFootprintSelected(f.GetMyFootprintStateObject().GetType()); if (f.GetMyFootprintStateObject().GetType() == typeof(FootprintStatePrime)) { SpawnStepParticleEffect(f.transform.position, partiPrimeStepPrefab); } else { SpawnStepParticleEffect(f.transform.position, partiNormalStepPrefab); } if (existingFootprints[0].footprint.GetInstanceID() == f.GetInstanceID()) { existingFootprints.RemoveAt(0); Destroy(f.gameObject); ActivateNextUp(); } else { Debug.LogError("Footprint clicked not at front of stack"); } }