Game
Planet Explore
10 years ago

Main Menu 1.0


English and Spanish

how it works:

guitexture with the script of the corresponding scene

one script use a door to move a plane where the credits it is activated with the “c” key,

ie the Main Camera will be within a cube where the trigger is activated while the door is inside the cube to tell us “precione the C key to display the credits.”

como trabaja:

un guitexture con la script de la escena correspondiente,

al darle click nos tirará la escena para jugarlo.

Creditos en el menú

una script de una puerta que uso para que mueva un plano donde se encuentran los creditos éste se activa con la tecla”c”,

es decir, la Main Camera estara dentro de un cubo donde esta activado el trigger, a la vez la puerta está dentro del cubo para que nos diga “preciona la tecla C para que aparezcan los créditos”.

Script:

var smooth = 2.0;
var DoorOpenAngle = 90.0;
private var open : boolean;
private var enter : boolean;

private var defaultRot : Vector3;
private var openRot : Vector3;

function Start(){
defaultRot = transform.eulerAngles;
openRot = new Vector3 (defaultRot.x, defaultRot.y + DoorOpenAngle, defaultRot.z);
}

function Update (){
if(open){
//Open door
transform.eulerAngles = Vector3.Slerp(transform.eulerAngles, openRot, Time.deltaTime smooth);
}else{
//Close door
transform.eulerAngles = Vector3.Slerp(transform.eulerAngles, defaultRot, Time.deltaTime smooth);
}

if(Input.GetKeyDown(“c”) && enter){
open = !open;
}
}

function OnGUI(){
if(enter){
GUI.Label(new Rect(Screen.width/2 - 75, Screen.height - 100, 150, 30), “Press C to display the Credits”);
}
}

function OnTriggerEnter (other : Collider){
if (other.gameObject.tag == “Player”) {
enter = true;
}
}

function OnTriggerExit (other : Collider){
if (other.gameObject.tag == “Player”) {
enter = false;
}
}



0 comments

Loading...

Next up

Smile! Here, take some happy pills! ✨💊 #Blender #3DModelling #3DArt Buy me a Ko-fi: https://ko-fi.com/barbarafb_

Chiaki Nanami!

Just a Pico sprite

Werehog transformation process. #sonicunleashed

Back in my art school days I used to ride the 710 COPSA line from Parque Del Plata to Montevideo almost everyday. This is the Marcopolo Viaggio G4 Mercedes Benz model from the late 80s, one of the older bus models that was running on the line.

New Teasers!

THANK YOU FOR 400 FOLLOWERS!!!

Here is a drawing a I made FOR ALL OF YOU

LOVE YOU GUYS❤

Art made for my friend @ungerbibs . Much love for this <3

I hate that stupid cupcake.

(New FNAF Friday show this week) (was sick for the last few days, sorry)

Breakable