private void btnAddCollider_Click(object sender, EventArgs e) { var collider = new MapToolCore.Collider(); listColliders.Items.Add(collider); pgCollider.SelectedObject = collider; if (animMeshObj != null) { collider.FrameNames = animMeshObj.FrameNames; } collider.PropertyChanged += Collider_PropertyChanged; }
private void DeleteToolStripMenuItem_Click(object sender, EventArgs e) { if (listColliders.SelectedItems.Count == 0) { return; } var colliders = new MapToolCore.Collider[listColliders.SelectedItems.Count]; listColliders.SelectedItems.CopyTo(colliders, 0); foreach (var collider in colliders) { listColliders.Items.Remove(collider); if (!collderNRenderObject.ContainsKey(collider)) { continue; } objList.Remove(collderNRenderObject[collider]); collderNRenderObject.Remove(collider); } renderView.Render(); }