private void OnDiscsDropped(BaGuaWheel.BaGuaDiscConfigurationChangedEvent @event) { configuration = @event.DiscConfiguration.Where(c => c.ElementType == type).First(); if (discs != null) { Apply(configuration); } }
private void Apply(BaGuaWheel.BaGuaDiscConfigurationChangedEvent.ElementDiscs configuration) { discs.RemoveAll(); Debug.Log("Discs removed from " + type); foreach (var discColor in configuration.Discs) { Debug.Log("Disc " + discColor + " added to " + type); discs.AddDisc(discColor); } }