#
pragma
strict
var myCursor : Texture2D ;
var myClickCursor : Texture2D ;
var width : int ;
var height : int ;
function Start () {
Screen . showCursor = false ;
width = 40 ;
height = 40 ;
}
function Update () {
}
function OnGUI ()
{
GUI . Label ( Rect ( 0 , 0 , 100 , 80 ), " x : " + Input . mousePosition . x . ToString () + " , y : " + Input . mousePosition . y . ToString ());
if ( Input . GetMouseButton ( 0 ))
GUI . DrawTexture ( Rect ( Input . mousePosition . x - width / 2.0 , Screen . height - Input . mousePosition . y - height / 2.0 , width , height ), myClickCursor );
else
GUI . DrawTexture ( Rect ( Input . mousePosition . x - width / 2.0 , Screen . height - Input . mousePosition . y - height / 2.0 , width , height ), myCursor );
}
var myCursor : Texture2D ;
var myClickCursor : Texture2D ;
var width : int ;
var height : int ;
function Start () {
Screen . showCursor = false ;
width = 40 ;
height = 40 ;
}
function Update () {
}
function OnGUI ()
{
GUI . Label ( Rect ( 0 , 0 , 100 , 80 ), " x : " + Input . mousePosition . x . ToString () + " , y : " + Input . mousePosition . y . ToString ());
if ( Input . GetMouseButton ( 0 ))
GUI . DrawTexture ( Rect ( Input . mousePosition . x - width / 2.0 , Screen . height - Input . mousePosition . y - height / 2.0 , width , height ), myClickCursor );
else
GUI . DrawTexture ( Rect ( Input . mousePosition . x - width / 2.0 , Screen . height - Input . mousePosition . y - height / 2.0 , width , height ), myCursor );
}