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

art comission.

"Thanks guys for endless hours of fun." 👍

(My first fan art. Read the article, please.)

#sonic #mario #photoshop

Shoobies leave a sticky trail of mucus in their wake, which can impede movement for any creature that steps in it.

Horror WIP A track that will be featured in a future horror game soundtrack! Stay tuned!

Likes appreciated ✌️

#gamedev #composer #horrorgame #indiegame #IndieGameDev #soundtrack

A house I've built a while ago. :)

It nicely separates the snowy biome from the grassy one.

It's built with painted Ebonstone.

Call it 'wrong turn'!🚫 The feeling of running into a house with only one exit🚪, and being doomed to die. #pixelart #pixelartist #pixelartwork #art #pixel #indiegame #IndieGameDev #indieartist

Today I tackled drawing different variations of facial expressions for one of the main characters in Eden. What do you think of it? :) Eden: https://gamejolt.com/games/Eden/592698

Regional Bulbasaur. #Pokemon