Example #1
0
 /// <summary>
 /// Initalizes the objects and managers in the game.
 /// </summary>
 protected override void Initialize()
 {
     base.Initialize();
     M_ContentManager.Init(Content);
     M_GlobalManager.Init();
     M_TextManager.Init();
     M_InputManager.Init();
     M_PartyManager.Init();
     M_MenuManager.Init();
     I_Inventory.Init();
     M_MapManager.Init();
 }
Example #2
0
    override public void WorkBuilding()
    {
        isWorking   = false;
        activeTimer = workTime;

        I_Inventory inventory = baseManager.GetInventory();

        I_Item itemInterface = chosenItem;

        itemInterface.CalculateBaseStats(workingVillagers[0]);

        inventory.AddItem(chosenItem);

        SetUpInfoPanel();
    }
Example #3
0
 /// <summary>
 /// Puts itself into the player's inventory
 /// </summary>
 public void CheckPickup()
 {
     if (M_GlobalManager.CanMove())
     {
         if (M_InputManager.KeyPressed(M_InputManager.GameKeys.Accept))
         {
             if (Vector2.Distance(this.world_position, M_PartyManager.Members[0].GetCenterpoint()) < this.pickup_dist)
             {
                 if (!I_Inventory.Add(this))
                 {
                     //Pull up a textbox saying "Inventory full!" or something
                 }
             }
         }
     }
 }
Example #4
0
    public void AddItem(BaseItem itemToAdd)
    {
        I_Inventory inventoryInterface = this;

        inventoryInterface.AddItem(itemToAdd);
    }