Beispiel #1
0
            protected override void CreateChildren()
            {
                base.CreateChildren();

                Bg = sharpdungeon.Chrome.Get(sharpdungeon.Chrome.Type.BUTTON);
                Add(Bg);

                Slot = new ItemSlot();
                Slot.TouchDownAction = button =>
                {
                    Bg.Brightness(1.2f);
                    Sample.Instance.Play(Assets.SND_CLICK);
                };
                Slot.TouchUpAction = button => Bg.ResetColor();
                Slot.ClickAction   = button => OnClick();
                Add(Slot);
            }
Beispiel #2
0
 protected override void OnTouchUp()
 {
     Bg.ResetColor();
 }