UNITY3D WAREHOUSE

WELCOME TO COMMUNITY.

OOOOOMG

I"M SO !!!.

!!!

Coming Soon.

!!!

Coming Soon..

Sunday, 31 May 2015

Unity3D Scrolling Background

Unity3D Scroll Background !















THIS IS C# script: GOOD 4 2D GAMES AND 3D GAMES !
----------------------------------------­­­­­­­----------------------------------­-­-­-­-­-­-­------

DIRECT DOWNLOAD HERE




THIS IS BACKUP  IN TEXT FORM  TUTORIAL 23/24

1. Create New C# and name it : ScrollBackground


2. Copy & Past this text and save C# :
----------------------------------------­­­­­------------------------------------­-­-­-­-­-


using UnityEngine;
using System.Collections;

public class ScrollBackground : MonoBehaviour
{
public float scrollSpeed = 0.05F; // speed 
    void Update()
{
//smooth
        float offset = Time.time * scrollSpeed;
//texture offset
        renderer.material.mainTextureOffset = new Vector2(offset, 0);
    }
}








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







Sunday, 24 May 2015

Unity3D Enemy Alert System

Unity3D Enemy Alert System










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

DIRECT DOWNLOAD HERE




THIS IS BACKUP  IN TEXT FORM  TUTORIAL 23/24 Script 1

1. Create New java and name it : Color


2. Copy & Past this text and save java :
----------------------------------------­­­­­------------------------------------­-­-­-­-­-


#pragma strict

// Fade the color from red to green
// back and forth over the defined duration

var colorStart : Color = Color.red;
var colorEnd : Color = Color.green;
var duration : float = 1.0;
var rend: Renderer;


function Start() {
rend = GetComponent.<Renderer>();
}


function Update () {
var lerp: float = Mathf.PingPong(Time.time, duration) / duration;
rend.material.color = Color.Lerp(colorStart, colorEnd, lerp);
}







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









THIS IS BACKUP  IN TEXT FORM  TUTORIAL 23/24 Script 2

1. Create New java and name it : EnableDisableObjectMesh


2. Copy & Past this text and save java :
----------------------------------------­­­­­------------------------------------­-­-­-­-­-


#pragma strict

function Start()
 {
   renderer.enabled = false;
 }

 function OnTriggerStay(Trigger : Collider)
 {
    if (Trigger.collider.tag == "enemy")
    {
         renderer.enabled = true;
         Debug.Log("OK");
           }
 }
         function OnTriggerExit ( other : Collider )
 {
     if ( other.gameObject.tag == "enemy" )
     {
         renderer.enabled = false;
     }
 }







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





















Friday, 15 May 2015

Unity 3D Make Water Waves Tutorial 22/24

Unity 3D Make Water Waves











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

DIRECT DOWNLOAD HERE




THIS IS BACKUP  IN TEXT FORM  TUTORIAL 22/24 Script Make Water Waves

1. Create New java and name it : MakeWaterWaves


2. Copy & Past this text and save java :
----------------------------------------­­­­­------------------------------------­-­-­-­-­-


//


var speed = 1.0;
var Height = 10.0;
private var baseHeight : Vector3[];
var useOriginal : boolean = false;


function Update () {
var mesh : Mesh = GetComponent(MeshFilter).mesh;

if (baseHeight == null)
baseHeight = mesh.vertices;

//

var vertices = new Vector3[baseHeight.Length];
for (var i=0;i<vertices.Length;i++)
{
var vertex = baseHeight[i];

if (useOriginal) {
vertex.y += Mathf.Sin(Time.time * speed+ baseHeight[i].x + baseHeight[i].y + baseHeight[i].z) * Height;
} else {
vertex.y += Mathf.Sin(Time.time * speed+ baseHeight[i].x + baseHeight[i].y) * (Height*.5) + Mathf.Sin(Time.time * speed+ baseHeight[i].z + baseHeight[i].y) * (Height*.5);
}

vertices[i] = vertex;
}
mesh.vertices = vertices;
mesh.RecalculateNormals();

gameObject.Destroy(GetComponent(MeshCollider));

var collider : MeshCollider = GetComponent(MeshCollider);
if (collider == null) {
collider = gameObject.AddComponent(MeshCollider);
collider.isTrigger = true;
}

}








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