1
Support / Re: alpha animation
« on: September 07, 2012, 04:22:33 pm »
I believe what dotty says is right, after you've made changes in the code, you need to do a .Commit() for it to actually change. Same goes if you change the text.
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
if (Input.x > position.x && Input.x < position.x + bounds.x){}
Thanks MooNizz for replying to these posts while I was away! Appreciate it.
tilePosition.y += layerid * 0.016f; // this is 16 pixels offset works for 32x32 tiles, take half the value of the tilemap pieces, if they're 64x64, add change the value to 0.032f and it should be fine.
if (layerid == 1){
tilePosition.y += layerid * 0.016f; // this is 16 pixels offset works for 32x32 tiles, take half the value of the tilemap pieces, if they're 64x64, add change the value to 0.032f and it should be fine.
}
tilePosition.z += z;
tilePosition.y += layerid * 0.01f; // <-- added this, and each layers go up a bit higher. modify for your purpose :D
void Update(){
CheckButtonInput();
if (buttonObject != null)
buttonObject.transform.position = Input.mousePosition;
}
void CheckButtonInput(){
if (Input.GetMouseButtonDown(0)) {
Ray ray = camera.ScreenPointToRay (Input.mousePosition);
if (Physics.Raycast(ray, out hit, 1000)){
if (hit.collider.tag == "button"){
buttonObject = hit.collider.gameobject;
} else {
buttonObject = null;
}
}
}
if (Input.GetMouseButtonUp(0)){
buttonObject = null;
}
}