Example #1
0
    private void OnDeselect()
    {
        Debug.Log("Deselect army entitiy");
        activated  = false;
        ActionMode = ArmyActionMode.Move;

        foreach (UnitSprite unitSprite in currentSpriteSlotHolder.GetComponentsInChildren <UnitSprite>())
        {
            unitSprite.StopPosing();
        }
    }
Example #2
0
    private void ActiveUpdate()
    {
        //Check for the Mode Change key.
        if (Input.GetKeyDown(KeyCode.M))
        {
            ActionMode = ArmyActionMode.Move;
        }
        else if (Input.GetKeyDown(KeyCode.N))
        {
            ActionMode = ArmyActionMode.SetSupply;
        }

        return;
    }
Example #3
0
    private void OnInitializeUI(UICom com)
    {
        UIArmy uiArmy = (UIArmy)com;

        uiArmy.SetText(Name, Controller.PlayerId.ToString(), Food.ToString(), "", Manpower.ToString(), "", "", "");
        void ArmyMove()
        {
            ActionMode = ArmyActionMode.Move;
        }

        void ArmySupply()
        {
            ActionMode = ArmyActionMode.SetSupply;
        }

        uiArmy.SetButtonListeners(ArmyMove, ArmySupply);
    }
Example #4
0
 private void OnDeselect()
 {
     activated  = false;
     ActionMode = ArmyActionMode.Move;
 }