Estimated 8.22 days before completion ~
Splash screen, main Menu interface, check-off interface, game interface,
Same card 01_ start screen portal
Start Screen interface
5s after start scene jumps to MainMenu scene
(0.5s blinks once!) )
Click the start scene (press any key) to jump from the start scene to the MainMenu scene
usingSystem.Collections;usingSystem.Collections.Generic;usingUnityengine;usingunityengine.scenemanagement; Public classScene_start:monobehaviour {float_timer; Gameobject Anykeyobj; //Use this for initialization voidStart () {_timer=0; Anykeyobj= Gameobject.find ("Anykeytxt"); } //Update is called once per frame voidUpdate () {_timer+=Time.deltatime; if(_timer%0.5f>0.25f) {anykeyobj.setactive (true); } Else{anykeyobj.setactive (false); } if(_timer>5||input.anykeydown) {gotomainmenu (); } } voidGotomainmenu () {Scenemanager.loadscene ("MainMenu"); }}
Scene_start.cs
Implementation process
Create four scenes and save them in the project
Create a game screen resolution
Canvas resolution and multi-screen adaptation
Add background (image), logo (image), name (text), Anykeytxt (TXT)
Create an empty object to mount the script
usingSystem.Collections;usingSystem.Collections.Generic;usingUnityengine;usingunityengine.scenemanagement; Public classScene_start:monobehaviour {float_timer; Gameobject Anykeyobj; //Use this for initialization voidStart () {_timer=0; Anykeyobj= Gameobject.find ("Anykeytxt"); } //Update is called once per frame voidUpdate () {_timer+=Time.deltatime; if(_timer%0.5f>0.25f) {anykeyobj.setactive (true); } Else{anykeyobj.setactive (false); } if(_timer>5||input.anykeydown) {//Press any key to jump directly to the main menu sceneGotomainmenu (); } } voidGotomainmenu () {Scenemanager.loadscene ("MainMenu"); }}
Scene_start.cs
Anykeytxt text Flicker Effect
Text Status visible
Anykeyobj.setactive (true);
Text state is not visible
Anykeyobj.setactive (false);
Add text flashes
if 0.5f 0.25f ) { anykeyobj.setactive (true); } Else { anykeyobj.setactive (false); }
After 5s or any key press, jump directly to the MainMenu scene
if (_timer>5| | Input.anykeydown) { gotomainmenu (); } void Gotomainmenu () { Scenemanager.loadscene ("MainMenu"); }
Unity3d_ (game) same card 01_ Start screen interface