public void calcAvg() { StayInfo.calcAVG(); RunInfo.calcAVG(); VInfo.calcAVGV(); sumTime = StayInfo.filtered.Sum() + RunInfo.filtered.Sum();; }
private void OnCollisionEvent(Collider2D other, ColliderEvent evt) { if (CheckFilter(other)) { return; } if (evt == ColliderEvent.Exit) { staying.Remove(other); return; } if (mode == DamageMode.Single) { bool isNew = false; if (!staying.TryGetValue(other, out StayInfo info)) { // Track new object. info = new StayInfo { collider = other, damageTimer = repeatDamageTime, damagedOnce = false, }; staying.Add(other, info); isNew = true; } // Initial (enter) damage. if (!info.damagedOnce) { info.damagedOnce = DoDamage(info.collider); } if (!isNew && repeatSingleDamage) { // Repeating damage. info.damageTimer -= Time.deltaTime; if (info.damageTimer <= 0) { if (DoDamage(info.collider)) { info.damageTimer = repeatDamageTime; } } } } else // DamageMode.Continuous { if (evt == ColliderEvent.Stay) { DoDamage(other); } } }
public void ExportPDF() { if (Stays != null && Stays.Count() != 0) { DocumentManager.ExportDataPDF(StayInfo.ConvertToList(Stays), "Export zvířata"); } else { MessageBox.Show("Žádná data pro export."); } }