private static void ActionTypePropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            ButtonActionCreation dependencyObject = d as ButtonActionCreation;
            ButtonConfigType     configType       = (ButtonConfigType)e.NewValue;

            dependencyObject.ButtonConfig = dependencyObject.buttonFactory.BuildButtonConfig(configType);
        }
 public static void ChoiseEvent(ButtonConfigType buttonConfigType)
 {
     switch(buttonConfigType){
     case ButtonConfigType.BuyCoins:
         OpenShopPanel();
         break;
     default:
         Debug.Log ("Click for nothing");
         break;
     }
 }
示例#3
0
    public static void ChoiseEvent(ButtonConfigType buttonConfigType)
    {
        switch (buttonConfigType)
        {
        case ButtonConfigType.BuyCoins:
            OpenShopPanel();
            break;

        default:
            Debug.Log("Click for nothing");
            break;
        }
    }
        public AButtonConfig BuildButtonConfig(ButtonConfigType type)
        {
            AButtonConfig res;

            switch (type)
            {
            case ButtonConfigType.Command:
                res = new CommandButtonConfig();
                break;

            case ButtonConfigType.KeyPress:
                res = new KeyPressButtonConfig();
                break;

            case ButtonConfigType.MouseAction:
                res = new MouseButtonConfig();
                break;

            default:
                throw new NotImplementedException();
            }
            return(res);
        }
 public void ChoiseEvent (ButtonConfigType buttonConfigType, ElementButton elementButton)
 {
   
 }
 public ConfigInf (Sprite sprite, String buttonConfigType)
 {
     this.sprite = sprite;
     this.buttonConfigType = (ButtonConfigType)Enum.Parse (typeof(ButtonConfigType), buttonConfigType);
 }
 public ConfigInf (Sprite sprite, ButtonConfigType buttonConfigType)
 {
     this.sprite = sprite;
     this.buttonConfigType = buttonConfigType;
 }
示例#8
0
 public ConfigInf(Sprite sprite, String buttonConfigType)
 {
     this.sprite           = sprite;
     this.buttonConfigType = (ButtonConfigType)Enum.Parse(typeof(ButtonConfigType), buttonConfigType);
 }
示例#9
0
 public ConfigInf(Sprite sprite, ButtonConfigType buttonConfigType)
 {
     this.sprite           = sprite;
     this.buttonConfigType = buttonConfigType;
 }
 public void ChoiseEvent(ButtonConfigType buttonConfigType, ElementButton elementButton)
 {
 }