Exemplo n.º 1
0
    void Start()
    {
        Main.Instance.MoveItem = OnMoveItem;

        GridiaConstants.SoundPlayer.MuteSfx = GridiaConstants.SoundPlayer.MuteMusic = Application.isEditor;

        Locator.Provide(InputManager);

        Locator.Provide(this);
        Locator.Provide(GridiaConstants.SoundPlayer);
        ResizeCamera();

        TabbedGui = new TabbedUI(new Vector2(Int32.MaxValue, 0));
        Locator.Provide(TabbedGui);
        TabbedGui.ScaleXY = GridiaConstants.GuiScale;

        InvGui = new ContainerWindow(new Vector2(0, Int32.MaxValue));
        Locator.Provide(InvGui);
        InvGui.ScaleXY = GridiaConstants.GuiScale;

        EquipmentGui = new EquipmentWindow(new Vector2(0, 0));
        Locator.Provide(EquipmentGui);
        EquipmentGui.ScaleXY = GridiaConstants.GuiScale;

        ChatGui = new ChatWindow(new Vector2(Int32.MaxValue, Int32.MaxValue));
        Locator.Provide(ChatGui);
        ChatGui.ScaleXY = GridiaConstants.GuiScale;

        ItemUsePickWindow = new ItemUsePickWindow(new Vector2(0, 0));
        Locator.Provide(ItemUsePickWindow);
        ItemUsePickWindow.ScaleXY = GridiaConstants.GuiScale;

        var helpMenu = new HelpMenu(new Vector2(0, 0));

        Locator.Provide(helpMenu);
        helpMenu.ScaleXY = GridiaConstants.GuiScale;

        Locator.Provide(ContentManager = new ContentManager(GridiaConstants.WorldName));
        Locator.Provide(TextureManager = new TextureManager(GridiaConstants.WorldName));

        ActionWindow = new ActionWindow(new Vector2(Int32.MaxValue, Int32.MaxValue));
        Locator.Provide(ActionWindow);
        ActionWindow.ScaleXY = GridiaConstants.GuiScale;
    }