Exemplo n.º 1
0
        public static SelectionInterfaceHandler GetInstance()
        {
            if (instance == null)
            {
                instance = FindObjectOfType <SelectionInterfaceHandler> ();
            }

            return(instance);
        }
Exemplo n.º 2
0
        void OnMouseDown()
        {
            //public void OnLeftClick(){

            if (IgnoreTouch)
            {
                return;
            }

            SelectionInterfaceHandler.GetInstance().SelectElement(this);

            for (int i = 0; i < behaviours.Count; i++)
            {
                behaviours[i].GameElementTouch();
            }

            PlaySound(Audio_OnSelect);
        }
Exemplo n.º 3
0
        public virtual void UpdateSelection()
        {
            if (IgnoreTouch)
            {
                return;
            }

            for (int i = 0; i < behaviours.Count; i++)
            {
                behaviours[i].GameElementUpdateSelection();
            }

            SelectionInterfaceHandler.GetInstance().EnableUpgradeButton(Gameplay_Upgrade != null);

            if (Gameplay_Upgrade != null)
            {
                SelectionInterfaceHandler.GetInstance().UpdateButton(Gameplay_UpgradeCost);
            }
        }
 public override void GameElementTouch()
 {
     SelectionInterfaceHandler.GetInstance().EnableHealth(true);
 }
 public override void GameElementUpdateSelection()
 {
     SelectionInterfaceHandler.GetInstance().UpdateHealth(_health_points);
 }
 public override void GameElementUpdateSelection()
 {
     SelectionInterfaceHandler.GetInstance().UpdateDamage(_damage_value);
 }
Exemplo n.º 7
0
 public override void GameElementTouch()
 {
     SelectionInterfaceHandler.GetInstance().EnableDamage(true);
     SelectionInterfaceHandler.GetInstance().EnableRange(true);
 }