UNITY3D WAREHOUSE

WELCOME TO COMMUNITY.

OOOOOMG

I"M SO !!!.

!!!

Coming Soon.

!!!

Coming Soon..

Friday, 13 February 2015

Unity3D press any key to play Tutorial 17

Unity3D press any key to play Tutorial 17
















DIRECT DOWNLOAD ALL PARTS HERE

--------------------------------------------------------------------------------------------------------------------------
THIS IS BACKUP  IN TEXT FORM
OFF ALL SCRIPTS OFF TUTORIAL 17
--------------------------------------------------------------------------------------------------------------------------
CREATE NEW C# AND NAME IT : ControlScene NEXT COPY PAST TEXT :
--------------------------------------------------------------------------------------------------------------------------

/// <summary>
/// This script use to control scene
/// </summary>

using UnityEngine;
using System.Collections;

public class ControlScene : MonoBehaviour {

public AudioClip sfxButton;
private bool oneshotSfx;
// Update is called once per frame
void Update () {
//if press any key jump to gameplay scene
if(Input.anyKeyDown)
{
if(!oneshotSfx)
{
AudioSource.PlayClipAtPoint(sfxButton,Vector3.zero);
Invoke("LoadScene",0.5f);
oneshotSfx = true;
}
}
}
void LoadScene()
{
//load gameplay scene
Application.LoadLevel("YOUR LEVEN NAME PUT HERE YES ");
}
}



















--------------------------------------------------------------------------------------------------------------------------
CREATE NEW C# AND NAME IT : AlphaText NEXT COPY PAST TEXT :
--------------------------------------------------------------------------------------------------------------------------



/// <summary>
/// This script use to fade GUI
/// </summary>


using UnityEngine;
using System.Collections;

public class AlphaText : MonoBehaviour {
public float speedFade;
private float count;
// Use this for initialization
void Start () {
}
// Update is called once per frame
void Update () {
//Fade in-out press start
count += speedFade * Time.deltaTime;
guiTexture.color = new Color(0.5f,0.5f,0.5f,Mathf.Sin(count)*0.5f);
}
}



--------------------------------------------------------------------------------------------------------------------------































Tuesday, 10 February 2015

Unity3D countdown timer and load level,scean or restart level Tutorial 16

Unity3D countdown timer and  load level,scean or restart level Tutorial 16






Unity3D countdown timer and  load level,scean or restart level Tutorial 16


THIS IS Java scrip: GOOD 4 2D GAMES AND 3D GAMES !


Download all parts HERE

----------------------------------------­­­­­------------------------------------­-­-­-­-­-
----------------------------------------­­­­­------------------------------------­-­-­-­-­-

Copyright Free Music in this video by:

Song: Virtual Riot - Energy Drink
» Download:
http://bit.ly/RebornDownload

Creative Commons License
http://creativecommons.org/licenses/b...

Artist's Links:
Virtual Riot - Energy Drink

http://www.facebook.com/virtualriotmusic
http://www.soundcloud.com/virtual-riot

----------------------------------------­­­­­------------------------------------­-­-­-­-­-






THIS IS BACKUP  IN TEXT FORM
OFF ALL SCRIPTS OFF TUTORIAL 16


------------------------------------------------
STEP NO.:1

NEW LEVEL LOAD FOLDER

NAME NEW JAVA LIKE THIS :

ONTRIGERENTERLOADLEVEL

COPY AND PAST THIS:

------------------------------------------------
#pragma strict

function OnTriggerEnter(Col : Collider)
{
     if(Col.tag == "Player")
     {
         Application.LoadLevel("MENILEVEL3");
     }
}
------------------------------------------------










STEP NO.:2

TIMER FOLDER
NAME NEW JAVA LIKE THIS :
Countdown
COPY AND PAST THIS:
------------------------------------------------

static var gameRunning : boolean = true;

var gameTimeAllowed : float = 20.0;

private var gameMessageLabel = "";
private var gameMessageDisplay : Rect;
private var timedOut : boolean = false;
private var gameTimeRemaining : float = gameTimeAllowed;

function Awake() {
    gameMessageDisplay = Rect(10, 10, Screen.width - 20, 40);
}

function OnGUI() {
    GUI.color = Color.yellow;
    GUI.backgroundColor = Color.black;

    var text : String = "";
    if (timedOut) {
        gameMessageLabel = "Time's up!!";
        Application.LoadLevel("MAINMENILEVEL CHOSE");
    } else {
        text = String.Format( "{0:00}:{1:00}", parseInt( gameTimeRemaining / 60.0 ), parseInt( gameTimeRemaining % 60.0 ) );
        gameMessageLabel = "Time left: " + text;
    }
    GUI.Box(gameMessageDisplay, gameMessageLabel);  
}

function Update() {
    if (!gameRunning)
        return;

    // Keep track of time and display a countdown
    gameTimeRemaining -= Time.deltaTime;
    if (gameTimeRemaining <= 0) {
        timedOut = true;
        gameRunning = false;
    }
}

------------------------------------------------







STEP NO.:3

TIMER FOLDER
NAME NEW JAVA LIKE THIS :
destroj countdown
COPY AND PAST THIS:
------------------------------------------------

#pragma strict

function OnTriggerEnter (other : Collider)
{
if(other.tag == "Player")
{
Destroy(gameObject);
}
}

------------------------------------------------





STEP NO.:4

TRIGER IMAGE
NAME NEW JAVA LIKE THIS :
JPEGAppear
COPY AND PAST THIS:
------------------------------------------------


private var guiShow : boolean = false;

var JPEG : Texture;

function OnTriggerEnter (Col : Collider)
{
if(Col.tag == "Player")
{
guiShow = true;
}
}

function OnTriggerExit (Col : Collider)
{
if(Col.tag == "Player")
{
guiShow = false;
}
}

function OnGUI()
{
if(guiShow == true)
{
GUI.DrawTexture(Rect(Screen.width / 4.5, Screen.height / 4, 300, 300), JPEG);
}
}

------------------------------------------------






STEP NO.:5

TRIGER IMAGE
NAME NEW JAVA LIKE THIS :
SOUNDTRIGER
COPY AND PAST THIS:
------------------------------------------------


var soundFile:AudioClip;

 function OnTriggerEnter(trigger:Collider) {
      if(trigger.collider.tag=="Player") {
         audio.clip = soundFile;
         audio.Play();
      }
 }


------------------------------------------------



Monday, 9 February 2015

Unity3D Destroy Object After a Delay! Tutorial 15

Unity3D Destroy Object After a Delay! Tutorial 15 





Unity3D Destroy Object After a Delay! Tutorial 15


THIS IS Java scrip: GOOD 4 2D GAMES AND 3D GAMES !
NAME NEW JAVA HOW JOU LIKE.. AND COPY PAST THIS :
----------------------------------------­­­­­­­----------------------------------­-­-­-­-­-­-­-

var Seconds = 10;

 function Update(){
     Destroy();
 }

 function Destroy(){
     yield WaitForSeconds(Seconds);
     Destroy(gameObject);
 }




----------------------------------------­­­­­­­----------------------------------­-­-­-­-­-­-­-
OR DIRECT DOWNLOAD SCRIPT  HERE.

----------------------------------------­­­­­­­----------------------------------­-­-­-­-­-­-­-

Copyright Free Music in this video by:

Song: Virtual Riot - Energy Drink
» Download:
http://bit.ly/RebornDownload

Creative Commons License
http://creativecommons.org/licenses/b...

Artist's Links:
Virtual Riot - Energy Drink

http://www.facebook.com/virtualriotmusic
http://www.soundcloud.com/virtual-riot

----------------------------------------­­­­­­­----------------------------------­-­-­-­-­-­-­-
Category
Gaming
Licence
Standard YouTube Licence

Friday, 6 February 2015

Unity3D Unity3D Flickering Light Tutorial 14

Unity3D Unity3D Flickering Light Tutorial 14






THIS IS C# scrip: GOOD 4 2D GAMES AND 3D GAMES !

Name c# script : FlickeringLight
----------------------------------------­­­­­------------------------------------­-­-­-­-­-




using UnityEngine;
using System.Collections;

[AddComponentMenu("Utilities/Flickering Light")]
public class FlickeringLight : MonoBehaviour
{
public float cycleDuration = 2f; // How long before looping back to the beginning of the curve
public int keysCount = 10; // The number of keys
public float startVal = 1f; // The value around which the intensity will be randomized
public float randMin = -1f, randMax = 1f; // The min and max of the curve
public float flickrIntensity = 1f; // The curve will be multiplied by that value and added to startVal
// You could use only the curve, but to change the light's behaviour you would need to
// Resample the keys. It involves Random calls, and can be expensive.
// By using intensity and startVal, you can modulate it at any time for no cost.


private AnimationCurve curve;

private IEnumerator Start ()
{
ResampleKeys();
while( Application.isPlaying )
{
float t = 0f;
float cycleInv = 1f / cycleDuration;
while( t < 1f )
{
light.intensity = startVal + curve.Evaluate( t ) * flickrIntensity;

yield return null;

t += Time.deltaTime * cycleInv;
}
}
}

// Can be called from outside if you want a different seed and new settings
public void ResampleKeys( float _startVal, float _randMin, float _randMax, float _intensity )
{
startVal = _startVal;
flickrIntensity = _intensity;
randMin = _randMin;
randMax = _randMax;

ResampleKeys();
}
// Can be called from outside if you want a different seed
public void ResampleKeys()
{
// Make sure there is at least 2 keys
keysCount = Mathf.Max( keysCount, 2 );

// Generate the keys randomly
Keyframe[] keys = new Keyframe[keysCount];
float inv = 1f / (keysCount-1);
for( int i = 0; i < keysCount; i++ )
keys[i] = new Keyframe( i * inv, Random.Range(randMin, randMax) );

// Make sure the first and last value matches to have a proper loop
float firstVal = keys[0].value;
float lastVal = keys[ keys.Length-1 ].value;
float middle = (firstVal + lastVal) * .5f;
keys[0].value = middle;
keys[ keys.Length-1 ].value = middle;

// Commit
curve = new AnimationCurve( keys );
}
}












----------------------------------------­­­­­------------------------------------­-­-­-­-­-




Copyright Free Music in this video by:

Song: Virtual Riot - Energy Drink
» Download:
http://bit.ly/RebornDownload

Creative Commons License
http://creativecommons.org/licenses/b...

Artist's Links:
Virtual Riot - Energy Drink

http://www.facebook.com/virtualriotmusic
http://www.soundcloud.com/virtual-riot

----------------------------------------­­­­­------------------------------------­-­-­-­-­-

Or download direct scereapt link here

Unity3D Simple Constant Rotate Object Tutorial 13

Unity3D Simple Constant Rotate Object Tutorial 13










THIS IS C# scrip: GOOD 4 2D GAMES AND 3D GAMES !

Name C# Script :  ConstantRotate
--------------------------------------------------------------------------------------------------------------------------



using UnityEngine;
using System.Collections;
 
public class ConstantRotate : MonoBehaviour {
 
        public float RotationsPerMinuteY=0;
        public float RotationsPerMinuteX=0;
        public float RotationsPerMinuteZ=0;    
 
        void Update ()
                {
                        Vector3 ConstantRotation = new Vector3 (0,0,0);
                       
                        if(RotationsPerMinuteX>0) {
                                ConstantRotation.x=6.0f*RotationsPerMinuteX*Time.deltaTime;
                        }
                       
                        if(RotationsPerMinuteZ>0) {
                                ConstantRotation.z=6.0f*RotationsPerMinuteZ*Time.deltaTime;
                        }
                       
                        if(RotationsPerMinuteY>0) {
                                ConstantRotation.y=6.0f*RotationsPerMinuteY*Time.deltaTime;
                        }
                    transform.Rotate (ConstantRotation); //rotates 50 degrees per second around z axis
                }
}

-----------------------------------------------------------------------------------------------------------------------
Or download direct link .  DOWNLOAD


























Monday, 2 February 2015

Unity3D Creating a Camera Shake Effect Like Earthquake Tutorial 12

Unity3D Creating a Camera Shake Effect Like Earthquake  Tutorial 11 










THIS IS Java scrip: GOOD 4 2D GAMES AND 3D GAMES ! 







-------------------------------------------------------------------------------------------------------------------------------------------------------

THIS IS Java scrip:  Script num 1 :  (  ShakeCam ) name your Scrpt : ShakeCam and copy past text !
-------------------------------------------------------------------------------------------------------------------------------------------------------


var ObjToShake : Transform;


function Update() {


        var randNrX = Random.Range(0.7,-0.7);

        var randNrY = Random.Range(0.7,-0.7);
        var randNrZ = Random.Range(0.7,-0.7);
        ObjToShake.transform.position += Vector3(randNrX,randNrY,randNrZ);

}



-------------------------------------------------------------------------------------------------------------------------------------------------------












-------------------------------------------------------------------------------------------------------------------------------------------------------

THIS IS Java scrip: Script num 2 :(  ShakeCamTrigger ) name your Scrpt: ShakeCamTrigger and copy past text 
-------------------------------------------------------------------------------------------------------------------------------------------------------




 #pragma strict


 var DragCamShakeEfectHere : GameObject;


 function Start ()

 {
     DragCamShakeEfectHere.GetComponent.<ShakeCam>().enabled = false;
 }
      
 function OnTriggerEnter (col : Collider)
 {
     if (col.tag == "Player")
     {
         DragCamShakeEfectHere.GetComponent.<ShakeCam>().enabled = true;
     }
 }
      
 function OnTriggerExit ()
 {
     DragCamShakeEfectHere.GetComponent.<ShakeCam>().enabled = false;

 }





-------------------------------------------------------------------------------------------------------------------------------------------------------


Or Download here 2 Scripts 
Text script in this blogg post is Backup 
Download link DOWNLOAD NOW








Sunday, 1 February 2015

Unity3D on trigger enter display Text. Tutorial 11

Unity3D on trigger enter  display Text. Tutorial 11


This is Better New Video it's more detailed.






THIS IS Java scrip: GOOD 4 2D GAMES AND 3D GAMES !
----------------------------------------­­­­­­-----------------------------------­-­-­-­-­-­------



var player : GameObject;
 private var bool : boolean;

 function OnTriggerEnter(other : Collider) {
 if(other.tag == "Player") {
 bool = true;
 }
 }

 function OnGUI(){
 if(bool == true) {
 if(GUI.Button (Rect (500, 300, 500, 80), "You can move by pressing the W,A,S,D Keys\nPress Space Bar to Jump, (E) Key is Action!\n\n[Click to close]")) {
 bool = false;
 Destroy(gameObject);

 }
 }

 }


----------------------------------------­­­­-------------------------------------­-­-­-­-











AND THIS VERSION OFF JAVA SCRIPT WILL NOT DESTROJ BOX OBJECT
ON TRIGGER ENTER :

--------------------------------------------------------------------------------------------------



#pragma strict

function Start () {

}

function Update () {

} var player : GameObject;
 private var bool : boolean;

 function OnTriggerEnter(other : Collider) {
 if(other.tag == "Player") {
     bool = true;
     }
 }

 function OnGUI(){
     if(bool == true) {
    if(GUI.Button (Rect (500, 300, 500, 80), "Message goes here       Click to close")) {
    Debug.Log("Door Works!");
    bool = false;
 
    }
 }
 

 }