Unity3D Tutorial How do I add sound to Mouse and Keyboard
Easter video series !
DIRECT DOWNLOAD HERE
Script 1 Off 3 BackUp Form
THIS IS BACKUP IN TEXT FORM TUTORIAL add sound to Mouse and Keyboard
1. Create New java and name it : LeftMouseButton
2. Copy & Past this text and save java : LeftMouseButton
---------------------------------------------------------------------------------
#pragma strict
var shootSound:AudioClip;
function Update(){
if (Input.GetButtonDown("Fire1")){
audio.PlayOneShot(shootSound);
}
}
---------------------------------------------------------------------------------
Script 2 Off 3 BackUp Form
THIS IS BACKUP IN TEXT FORM TUTORIAL add sound to Mouse and Keyboard
1. Create New java and name it : RightMouseButton
2. Copy & Past this text and save java : RightMouseButton
---------------------------------------------------------------------------------
#pragma strict
var shootSound:AudioClip;
function Update(){
if (Input.GetButtonDown("Fire2")){
audio.PlayOneShot(shootSound);
}
}
---------------------------------------------------------------------------------
Script 3 Off 3 BackUp Form
THIS IS BACKUP IN TEXT FORM TUTORIAL add sound to Mouse and Keyboard
1. Create New java and name it : OnKeyDown
2. Copy & Past this text and save java : OnKeyDown
---------------------------------------------------------------------------------
#pragma strict
var shootSound:AudioClip;
function Update(){
if (Input.GetKeyDown("f")){
audio.PlayOneShot(shootSound);
}
}
---------------------------------------------------------------------------------
0 comments:
Post a Comment