public Order(OrderName _name, Vector3 _position, RTSGameObject _gameObject)
 {
     this._name          = _name;
     this._position      = _position;
     this._gameObject    = _gameObject;
     this._buildingGhost = null;
 }
Esempio n. 2
0
    public void CancelCreate()
    {
        _creatingUnit = false;

        orders[0] = OrderName.Mouse1;
        //if (!GameMaster.Player1Hero && (!GetGUI.Equals(null)) && (!GetGUI.ProductionBar[0].Equals(null)))
        //if ((!GetGUI.Equals(null)) && (!GetGUI.ProductionBar[0].Equals(null)))
        //    GameObject.Destroy(GetGUI.ProductionBar[0]);
        //else
        //    Debug.LogWarning("No production for the building");

        ordersCanceled++;

        //if (!GameMaster.Player1Hero)
        //{
        for (int i = 1; i < orders.Length; i++)
        {
            OrderName tmp = orders[i];
            orders[i]     = orders[i - 1];
            orders[i - 1] = tmp;

            GameObject tmpG = GetGUI.ProductionBar[i];
            GetGUI.ProductionBar[i]     = GetGUI.ProductionBar[i - 1];
            GetGUI.ProductionBar[i - 1] = tmpG;
        }

        UpdateButtons(0);
        //}
        ordersCount--;
    }
Esempio n. 3
0
        public static bool IsOrderType(this Type type, OrderName orderName)
        {
            switch (orderName)
            {
            case OrderName.Car:
                return(type == Type.CarBody || type == Type.Wheel);

                break;

            case OrderName.Robot:
                return
                    (type == Type.RobotArms ||
                     type == Type.RobotLeg ||
                     type == Type.RobotCore ||
                     type == Type.RobotHead ||
                     type == Type.Weapon);

                break;

            case OrderName.Doll:
                return(type == Type.DollBody ||
                       type == Type.DollHead ||
                       type == Type.Ribbon);

                break;

            default:
                throw new ArgumentOutOfRangeException(nameof(orderName), orderName, null);
            }
        }
Esempio n. 4
0
        public DepositInfo(ResponseCoinListModel item)
        {
            OrderName = item.CoinName;
            OrderCode = item.CoinCode;

            string sLanguage = LoginViewModel.LanguagePack;

            img_deposit            = "/Images/img_deposit_" + OrderName + ".png";
            btn_ewallet            = sLanguage + "btn_ewallet_" + OrderName + ".png";
            btn_ewallet_on         = sLanguage + "btn_ewallet_" + OrderName + "_on.png";
            btn_address_copy       = sLanguage + "btn_address_copy.png";
            btn_address_copy_on    = sLanguage + "btn_address_copy_on.png";
            btn_address_copy_press = sLanguage + "btn_address_copy_press.png";

            if (item.IsTagYn.Equals("Y"))
            {
                isTagY = Visibility.Visible;
                if (OrderName.Equals("XRP"))
                {
                    TagName = "DestinationTag";
                }
                else if (OrderName.Equals("VSTC") || OrderName.Equals("XEM"))
                {
                    TagName = "Message";
                }
                else if (OrderName.Equals("XLM") || OrderName.Equals("EOS"))
                {
                    TagName = "Memo";
                }
            }
            else
            {
                isTagN = Visibility.Visible;
            }
        }
Esempio n. 5
0
    public void Next()
    {
        int position = 0;

        for (int i = 0; i < GetGUI.ProductionBar.Length; i++)
        {
            if (GetGUI.ProductionBar[i] == null)
            {
                position = i;
                break;
            }
        }

        if (position == 0)
        {
            _creatingUnit = false;
        }
        orders[position] = OrderName.Mouse1;

        for (int i = position + 1; i < orders.Length; i++)
        {
            OrderName tmp = orders[i];
            orders[i]     = orders[i - 1];
            orders[i - 1] = tmp;

            GameObject tmpG = GetGUI.ProductionBar[i];
            GetGUI.ProductionBar[i]     = GetGUI.ProductionBar[i - 1];
            GetGUI.ProductionBar[i - 1] = tmpG;
        }

        ordersCount--;

        UpdateButtons(position);
    }
        public IActionResponse <OrderName> Add(OrderName model)
        {
            _orderName.Add(model);
            var rep = _uow.SaveChanges();

            return(new ActionResponse <OrderName> {
                Result = model,
                Message = rep.ToSaveChangeMessageResult(BusinessMessage.Success, BusinessMessage.Error),
                IsSuccessful = rep.ToSaveChangeResult()
            });
        }
Esempio n. 7
0
    public void addAction(OrderName action)
    {
        for (int i = 0; i < Actions.Count; i++)
        {
            if (Actions[i].Equals(action))
            {
                return;
            }
        }

        Actions.Add(action);
    }
        private async UniTask <ShippingParts> WaitForShippingAsync(OrderName orderName)
        {
            await _beltConveyor.MoveToShippingAsync(partsShippingTime);

            var currentParts = _assemblyArea
                               .CurrentPartObjects
                               .Select(x => x.Part)
                               .ToArray();

            _assemblyArea.DestroyAllParts();
            Destroy(_assemblyArea.gameObject);

            return(new ShippingParts(currentParts, orderName));
        }
        void ReleaseDesignerOutlets()
        {
            if (OrderName != null)
            {
                OrderName.Dispose();
                OrderName = null;
            }

            if (OrderStatus != null)
            {
                OrderStatus.Dispose();
                OrderStatus = null;
            }
        }
Esempio n. 10
0
        public virtual JsonResult Add(OrderName model)
        {
            if (!ModelState.IsValid)
            {
                return(Json(new { ISuccessful = false, Message = LocalMessage.ValidationFailed }));
            }
            var rep = _orderNameBusiness.Add(model);

            return(Json(new
            {
                rep.IsSuccessful,
                rep.Message,
                Result = !rep.IsSuccessful ? null : MvcExtention.RenderViewToString(this, MVC.OrderName.Views.Partials._ShowItem, rep.Result)
            }));
        }
Esempio n. 11
0
 private void AddProduction(OrderName order)
 {
     if (ordersCount < 6)
     {
         GameObject btn = Instantiate(gameMaster.buttonPrefab);
         btn.transform.SetParent(GameObject.FindGameObjectWithTag("Canvas").transform, false);
         btn.transform.GetChild(0).gameObject.GetComponent <Text>().text = GetCreation(order).name;
         gameMaster.AddButtonListener(btn, order, btn, ordersCount);
         btn.GetComponent <RectTransform>().localPosition = new Vector3((ordersCount * 100) - 60f, -355.9f, 0);
         btn.SetActive(false);
         print(ordersCount);
         GetGUI.ProductionBar[ordersCount] = btn;
         orders[ordersCount] = order;
         ordersCount++;
     }
 }
Esempio n. 12
0
    public CreationBuilding GetBuilding(OrderName order)
    {
        if (order.Equals(OrderName.Build0))
        {
            return(Buildings[0]);
        }
        else if (order.Equals(OrderName.Build1))
        {
            return(Buildings[1]);
        }
        else if (order.Equals(OrderName.Build2))
        {
            return(Buildings[2]);
        }

        return(null);
    }
Esempio n. 13
0
    public WalkingUnit GetCreation(OrderName order)
    {
        if (order.Equals(OrderName.Create0))
        {
            return(Creations[0]);
        }
        else if (order.Equals(OrderName.Create1))
        {
            return(Creations[1]);
        }
        else if (order.Equals(OrderName.Create2))
        {
            return(Creations[2]);
        }

        return(null);
    }
Esempio n. 14
0
 public Skill GetSkill(OrderName skillName)
 {
     if (skillName.Equals(OrderName.Skill0))
     {
         return(Skills[0]);
     }
     else if (skillName.Equals(OrderName.Skill1))
     {
         return(Skills[1]);
     }
     else if (skillName.Equals(OrderName.Skill2))
     {
         return(Skills[2]);
     }
     else
     {
         return(Skills[3]);
     }
 }
Esempio n. 15
0
 public Order(OrderName name, int comboBonus, OrderElement[] elements)
 {
     _name       = name;
     _comboBonus = comboBonus;
     _elements   = elements;
 }
 public ShippingParts(IReadOnlyList <Part> parts, OrderName orderName)
 {
     Parts     = parts;
     OrderName = orderName;
 }