Beispiel #1
0
 private void setMouseButton(GameOptions.toolModes toolMode)
 {
     Debug.Log("setMouseButton for " + toolMode);
     if (gmm.lastMouseButton < 0 || gmm.lastMouseButton > 1)
     {
         Debug.Log("Error. ran setMouseButton but left and right mouse weren't clicking?");
     }
     else
     {
         GameOptions.mouseTool[gmm.lastMouseButton] = toolMode;
     }
 }
Beispiel #2
0
    static public Texture getToolModeTexture(GameOptions.toolModes toolMode)
    {
        if (toolModeTextures == null)
        {
            toolModeTextures = new Hashtable();

            Texture texture = Resources.Load(ResourcePaths.toolModePlace) as Texture;
            toolModeTextures.Add(GameOptions.toolModes.placeBlock, texture);

            texture = Resources.Load(ResourcePaths.toolModeRemove) as Texture;
            toolModeTextures.Add(GameOptions.toolModes.removeBlock, texture);

            texture = Resources.Load(ResourcePaths.toolModeRepair) as Texture;
            toolModeTextures.Add(GameOptions.toolModes.repairBlock, texture);

            texture = Resources.Load(ResourcePaths.toolModeScan) as Texture;
            toolModeTextures.Add(GameOptions.toolModes.scanBlock, texture);
        }

        return((Texture)toolModeTextures[toolMode]);
    }