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); }
public override void LoadingEnd() { view = CreateView<EquipView>(); view.AddEvent(OnEventChangeCategory, Exit); int categoryIndex = PlayerPrefs.GetInt("EquipCategory", 0); OnEventChangeCategory(categoryIndex); }
public void EquipInit(PlayerEquipment equip) { _equip = FindObjectOfType <EquipView>(); _equip.Initialization(equip); }