Ejemplo n.º 1
0
    //! Called by unity engine on start up to initialize variables.
    public void Start()
    {
        playerController = GetComponent <PlayerController>();
        GameManager gameManager = GameObject.Find("GameManager").GetComponent <GameManager>();

        textureDictionary = gameManager.GetComponent <TextureDictionary>();
        guiCoordinates    = new GuiCoordinates();
    }
Ejemplo n.º 2
0
 //! Called by unity engine on start up to initialize variables.
 public void Start()
 {
     playerController      = GetComponent <PlayerController>();
     playerInventory       = GetComponent <InventoryManager>();
     stateManager          = GameObject.Find("GameManager").GetComponent <StateManager>();
     gameManager           = GameObject.Find("GameManager").GetComponent <GameManager>();
     textureDictionary     = gameManager.GetComponent <TextureDictionary>();
     descriptions          = new Descriptions();
     guiCoordinates        = new GuiCoordinates();
     paintSelectionTexture = new Texture2D(512, 128);
 }
Ejemplo n.º 3
0
    //! Called by unity engine on start up to initialize variables.
    public void Start()
    {
        playerController = GameObject.Find("Player").GetComponent <PlayerController>();
        guiCoordinates   = new GuiCoordinates();
        slots            = new Dictionary <int, string>();
        GameManager gameManager = GameObject.Find("GameManager").GetComponent <GameManager>();

        textureDictionary = gameManager.GetComponent <TextureDictionary>();
        boxTexture        = Resources.Load("ShadedSelectionBox") as Texture2D;
        toggled           = true;
    }
Ejemplo n.º 4
0
    //! Called by unity engine on start up to initialize variables.
    public void Start()
    {
        playerController = GetComponent <PlayerController>();
        GameManager gameManager = GameObject.Find("GameManager").GetComponent <GameManager>();

        textureDictionary = gameManager.GetComponent <TextureDictionary>();
        guiCoordinates    = new GuiCoordinates();
        descriptions      = new Descriptions();
        priceDictionary   = new Dictionary <string, int>
        {
            { "Iron Block", 10 },
            { "Iron Ramp", 10 },
            { "Steel Block", 10 },
            { "Steel Ramp", 10 },
            { "Glass Block", 10 },
            { "Brick", 10 },
            { "Electric Light", 50 },
            { "Dark Matter Collector", 5000 },
            { "Dark Matter Conduit", 4000 },
            { "Universal Conduit", 100 },
            { "Universal Extractor", 250 },
            { "Auger", 50 },
            { "Door", 50 },
            { "Quantum Hatchway", 50 },
            { "Storage Container", 50 },
            { "Smelter", 500 },
            { "Turret", 2500 },
            { "Missile Turret", 3500 },
            { "Missile", 500 },
            { "Solar Panel", 250 },
            { "Generator", 500 },
            { "Power Conduit", 100 },
            { "Nuclear Reactor", 2500 },
            { "Reactor Turbine", 2500 },
            { "Alloy Smelter", 2000 },
            { "Press", 50 },
            { "Extruder", 50 },
            { "Retriever", 250 },
            { "Heat Exchanger", 1500 },
            { "Gear Cutter", 2000 },
            { "Auto Crafter", 3000 },
            { "Rail Cart", 1500 },
            { "Rail Cart Hub", 1000 },
            { "Storage Computer", 2500 },
            { "Circuit Board", 50 },
            { "Electric Motor", 50 }
        };
    }
Ejemplo n.º 5
0
 //! This class handles inventory related functions that don't directly require the OnGUI method.
 public InventoryHandler(PlayerController playerController, InventoryManager playerInventory)
 {
     this.playerController = playerController;
     this.playerInventory  = playerInventory;
     guiCoordinates        = new GuiCoordinates();
 }