Exemplo n.º 1
0
        public override void RegisterChildren()
        {
            PlayerInventoryView = new InventoryView(this, inv);
            var x = PlayerInventoryView.Node;

            x.Top           = 20;
            x.Right         = 20;
            x.PositionType  = Facebook.Yoga.YogaPositionType.Absolute;
            x.FlexDirection = Facebook.Yoga.YogaFlexDirection.Row;
            x.Wrap          = Facebook.Yoga.YogaWrap.Wrap;

            TargetInventoryView = new InventoryView(this, inv)
            {
                Visible = false
            };
            x = TargetInventoryView.Node;
            x.PositionType = Facebook.Yoga.YogaPositionType.Absolute;

            EquipView = new EquipView(this, Game.Player);

            Root.RegisterChild(playerHUD);
            Root.RegisterChild(PlayerInventoryView);
            Root.RegisterChild(TargetInventoryView);
            Root.RegisterChild(EquipView);
        }
Exemplo n.º 2
0
    public override void LoadingEnd()
    {
        view = CreateView<EquipView>();
        view.AddEvent(OnEventChangeCategory, Exit);

        int categoryIndex = PlayerPrefs.GetInt("EquipCategory", 0);
        OnEventChangeCategory(categoryIndex);
    }
Exemplo n.º 3
0
 public void EquipInit(PlayerEquipment equip)
 {
     _equip = FindObjectOfType <EquipView>();
     _equip.Initialization(equip);
 }