Пример #1
0
        private void OnDiscsDropped(BaGuaWheel.BaGuaDiscConfigurationChangedEvent @event)
        {
            configuration = @event.DiscConfiguration.Where(c => c.ElementType == type).First();

            if (discs != null)
            {
                Apply(configuration);
            }
        }
Пример #2
0
        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);
            }
        }