Redirecting you to bearmacstudios.com.... BearMac Studios: Resources

Pages

Showing posts with label Resources. Show all posts
Showing posts with label Resources. Show all posts

Thursday, February 16, 2012

Pause Menu Script!

Here's a script that's extremely similar to the main menu script. It's for the pause menu in the tutorial that's on YouTube right now!

var menuHeight:float=500;
var menuWidth:float=500;
var buttonSpacing:float=25;
var mainMenu: String = "MainMenu";
var titleTexture:Texture2D;
var customSkin:GUISkin;
var customStyle:GUIStyle;

function OnGUI(){
GUI.skin = customSkin;
GUILayout.BeginArea(Rect(Screen.width/2-menuWidth/2,Screen.height/2-menuHeight/2,menuHeight,menuWidth),customStyle);
GUILayout.Space(50);
GUILayout.Label(titleTexture);
GUILayout.Space(buttonSpacing);
if(GUILayout.Button("Main Menu")){
Application.LoadLevel(mainMenu);
}
GUILayout.Space(buttonSpacing);
if(GUILayout.Button("Exit to Desktop")){
Application.Quit();
}
GUILayout.Space(buttonSpacing);
GUILayout.EndArea();
}

Thursday, February 9, 2012

Woah! two videos in one day!

I uploaded another video today. it's a tutorial. great learning experience. You guys must think I'm crazy with two videos within the same day! so take a look and enjoy! I'll be uploading the full script as soon as we get it finished! if you comment and stuff like that it encourages me to continue my work and it helps me out a lot!


Thursday, February 2, 2012

Main Menu

Here's the main menu script. Take a look, ask any questions in the comments.

//mainmenu.js by mactinite 
//Simple main menu
var areaHeight : float= 200;
var areaWidth : float= 200;
var layoutCenter : float = 100;
var firstLevel : String = "First";
var buttonSpacing : float = 25;
var customSkin : GUISkin;
var layoutStyle : GUIStyle;
var textureTop : Texture2D;
function OnGUI(){
GUI.skin = customSkin;
GUILayout.BeginArea(Rect(Screen.width/2-areaWidth/2,Screen.height/2-areaHeight/2,areaWidth,areaHeight),layoutStyle);
GUILayout.Space(25);
GUILayout.Label(textureTop);
GUILayout.Space(buttonSpacing);
 if(GUILayout.Button("Start Game")){
 Application.LoadLevel(firstLevel);
 }
GUILayout.Space(buttonSpacing);
 if(GUILayout.Button("Quit")){
 Application.Quit();
 }
GUILayout.EndArea();
}

Friday, January 27, 2012

Lots of Great Stuff

A great website to look at is armed unity they have some great stuff but where they really shine is in the forums, with free resources and tutorials, including OMA's FPS kit. A lot of learning opportunities as well as stuff that'll work without any knowledge of scripting. The community itself works together in improving the kit to better meet your needs. So go ahead and make an account. It's worth it.