diff --git a/Assets/art/Resources/blackbeard.png b/Assets/art/Resources/blackbeard.png new file mode 100644 index 0000000..4bbae99 Binary files /dev/null and b/Assets/art/Resources/blackbeard.png differ diff --git a/Assets/art/Resources/blackbeard.png.meta b/Assets/art/Resources/blackbeard.png.meta new file mode 100644 index 0000000..1616711 --- /dev/null +++ b/Assets/art/Resources/blackbeard.png.meta @@ -0,0 +1,56 @@ +fileFormatVersion: 2 +guid: 6c58dad52af1cef428cd905db9dbbb90 +timeCreated: 1454256725 +licenseType: Free +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 8 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 2048 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + allowsAlphaSplitting: 0 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 1 + textureType: 8 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/art/Resources/redbeard.png b/Assets/art/Resources/redbeard.png new file mode 100644 index 0000000..87d537b Binary files /dev/null and b/Assets/art/Resources/redbeard.png differ diff --git a/Assets/art/Resources/redbeard.png.meta b/Assets/art/Resources/redbeard.png.meta new file mode 100644 index 0000000..00b67d8 --- /dev/null +++ b/Assets/art/Resources/redbeard.png.meta @@ -0,0 +1,56 @@ +fileFormatVersion: 2 +guid: 283dd5710bea31e4abd88773113173c8 +timeCreated: 1454256725 +licenseType: Free +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 8 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 2048 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + allowsAlphaSplitting: 0 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 1 + textureType: 8 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/art/Resources/yellowbeard.png b/Assets/art/Resources/yellowbeard.png new file mode 100644 index 0000000..f66e409 Binary files /dev/null and b/Assets/art/Resources/yellowbeard.png differ diff --git a/Assets/art/Resources/yellowbeard.png.meta b/Assets/art/Resources/yellowbeard.png.meta new file mode 100644 index 0000000..96ef698 --- /dev/null +++ b/Assets/art/Resources/yellowbeard.png.meta @@ -0,0 +1,56 @@ +fileFormatVersion: 2 +guid: 581ffab6d8ad5c74f9f1c0e84a396a1b +timeCreated: 1454256725 +licenseType: Free +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 8 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 2048 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + allowsAlphaSplitting: 0 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 1 + textureType: 8 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/scripts/GUIGameplay.cs b/Assets/scripts/GUIGameplay.cs index b3f0c97..8d70267 100644 --- a/Assets/scripts/GUIGameplay.cs +++ b/Assets/scripts/GUIGameplay.cs @@ -2,7 +2,8 @@ using System.Collections; public class GUIGameplay : MonoBehaviour { - + public const int boxHeight=90,boxWidth=50; + public const int offset = 10; // Use this for initialization void Start () { @@ -14,33 +15,37 @@ public class GUIGameplay : MonoBehaviour { } void OnGUI() { - + int x = 0; // Make the first button. If it is pressed, Application.Loadlevel (1) will be executed - for(int i = 0; i("yellowbeard"); break; case 1: - GUI.color = new Color(1,0 , 0, 0.5f); playerName = "Red beard"; + beardTex = Resources.Load("redbeard"); break; case 2: - GUI.color = new Color(0, 0, 1, 0.5f); playerName = "Black beard"; + beardTex = Resources.Load("blackbeard"); break; default: break; } + //beardTex.Resize(10, 10); + int offset =(int) ((Screen.width - 3 * boxWidth) / 4f); + x += offset ; + GUI.Box(new Rect(x , 0, boxWidth, 90), beardTex, boxStyle); + - GUI.Box(new Rect(10+ Screen.width /3 * i , 10, 200, 90), playerName); - GUI.color = temp; - Player p = GameState.Instance.players[i]; for (int j = 0;j< p.letters.Length;++j) { @@ -50,20 +55,20 @@ public class GUIGameplay : MonoBehaviour { // Debug.Log(p.score); if (j+1 > p.index) { - - temp = GUI.color ; + Color temp = GUI.color ; GUI.color = new Color(1f, 1f, 1f, 0.50f); - GUI.DrawTexture(new Rect(20 + Screen.width / 3 * i + j * 30 + 20, 40, 30, 30), rune); + GUI.DrawTexture(new Rect(x + j * 30 + 20 , 40, 30, 30), rune); GUI.color = temp; } else { - GUI.DrawTexture(new Rect(20 + Screen.width / 3 * i + j * 30 + 20, 40, 30, 30), rune); + GUI.DrawTexture(new Rect(x + j * 30 + 20 , 40, 30, 30), rune); } } + x += boxWidth; } }