public void assignVoxel(World thisworld, WorldPos position, int number) { prime = thisworld.GetBlock(position.x,position.y,position.z); corner = (handledirection) number; pos.x = position.x; pos.y = position.y; pos.z = position.z; offx = prime.offx; offy = prime.offy; offz = prime.offz; transform.position = Camera.main.WorldToScreenPoint(new Vector3 (pos.x+offx, pos.y+offy, pos.z+offz)); setupHandle (number); }
void Start() { pos.x = 0; pos.y = 0; pos.z = 0; offx = 0.5f; offy = 0.5f; offz = 0.5f; corner = handledirection.NW_T; GameObject tempgo = GameObject.FindWithTag ("world"); world = tempgo.GetComponent("World") as World; }