Pengenalan Transportasi Umum Berbasis Android Dalam Bahasa Mandarin Menggunakan Augmented Reality
LAMPIRAN
LISTING PROGRAM
Script Rotasi :
using UnityEngine;
using System.Collections;
public class Rotate : MonoBehaviour {
private float rotationRate = 3.0f;
void Update () {
// get the user touch input
foreach (Touch touch in Input.touches) {
Debug.Log("Touching at: " +
touch.position);
if (touch.phase == TouchPhase.Began) {
Debug.Log("Touch phase began at: " +
touch.position);
} else if (touch.phase ==
TouchPhase.Moved) {
Debug.Log("Touch phase Moved");
transform.Rotate
(touch.deltaPosition.y * rotationRate,
touch.deltaPosition.x * rotationRate, 0, Space.World);
} else if (touch.phase ==
TouchPhase.Ended) {
Debug.Log("Touch phase Ended");
}
}
}
}
Universitas Sumatera Utara
Script Zoom :
using UnityEngine;
private void Scale(float scale, Vector2 screenCenter)
{
// Make sure the scale is valid
if (scale > 0.0f)
{
if (Relative == true)
{
// If camera is null, try and
get the main camera, return true if a camera was found
if (LeanTouch.GetCamera(ref
Camera) == true)
{
// Screen position of the
transform
var screenPosition =
Camera.WorldToScreenPoint(transform.position);
// Push the screen position
away from the reference point based on the scale
screenPosition.x =
screenCenter.x + (screenPosition.x - screenCenter.x) *
scale;
screenPosition.y =
screenCenter.y + (screenPosition.y - screenCenter.y) *
scale;
// Convert back to world
space
transform.position =
Camera.ScreenToWorldPoint(screenPosition);
// Grow the local scale by
scale
transform.localScale *=
scale;
}
}
else
{
// Grow the local scale by scale
transform.localScale *= scale;
}
}
}
Universitas Sumatera Utara
Script GoTo,Back, Unduh dan Exit :
using UnityEngine;
using System.Collections;
using UnityEngine.UI;
public class Event : MonoBehaviour {
public GameObject panel;
public void start (int mulaistart){
Application.LoadLevel (mulaistart);
}
public void ExitApplication(){
ExitApplication ();
}
public void Exit(){
Application.Quit ();
}
public void URL (){
Application.OpenURL
("https://drive.google.com/open?id=0By8OhyrPnMkbDAxdjhDTGpxbDQ");
}
public void ShowPnl()
{
panel.gameObject.SetActive(true);
}
public void HidePnl()
{
panel.gameObject.SetActive (false);
}
}
Universitas Sumatera Utara
CURRICULUM VITAE
Identitas Pribadi
Nama Lengkap
: Azhari Hidayat
Nama akrab
: Ari
Tanggal Lahir
: 12 Januari 1994
Tempat Lahir
: Medan
Tinggi/ Berat badan
: 173 cm/ 80 kg
Jenis Kelamin
: Laki-laki
Status Perkawinan
: Belum Menikah
Agama
: Islam
Alamat
: Jalan Kesehatan Gg.Teratai 7 No.18
Nomor HP
: 081349509331
E-mail
: azhari.hidayat29@gmail.com
Pendidikan Formal
Pendidikan
Sekolah
Tahun
SD
SDN 101770 – Deli Serdang
1999 – 2005
SMP
SMPN 1 Percut Sei Tuan – Deli Serdang
2005 – 2008
SMA
SMAN 11 Medan – Medan
2008 – 2011
Universitas
D3 Teknik Informatika USU – Sumatera Utara
2011 – 2014
Seminar / Workshop / Kursus
Training / Seminar / Workshop
Tempat
Tahun
Seminar Nasional Literasi Informasi USU, Sumatera Utara
2014
(SENARAI)
Pengalaman Organisasi dan Kepanitiaan
Tahun
Organisasi/Kepanitiaan
Posisi
2010-2011
Organisasi Pramuka
Anggota
Universitas Sumatera Utara
LISTING PROGRAM
Script Rotasi :
using UnityEngine;
using System.Collections;
public class Rotate : MonoBehaviour {
private float rotationRate = 3.0f;
void Update () {
// get the user touch input
foreach (Touch touch in Input.touches) {
Debug.Log("Touching at: " +
touch.position);
if (touch.phase == TouchPhase.Began) {
Debug.Log("Touch phase began at: " +
touch.position);
} else if (touch.phase ==
TouchPhase.Moved) {
Debug.Log("Touch phase Moved");
transform.Rotate
(touch.deltaPosition.y * rotationRate,
touch.deltaPosition.x * rotationRate, 0, Space.World);
} else if (touch.phase ==
TouchPhase.Ended) {
Debug.Log("Touch phase Ended");
}
}
}
}
Universitas Sumatera Utara
Script Zoom :
using UnityEngine;
private void Scale(float scale, Vector2 screenCenter)
{
// Make sure the scale is valid
if (scale > 0.0f)
{
if (Relative == true)
{
// If camera is null, try and
get the main camera, return true if a camera was found
if (LeanTouch.GetCamera(ref
Camera) == true)
{
// Screen position of the
transform
var screenPosition =
Camera.WorldToScreenPoint(transform.position);
// Push the screen position
away from the reference point based on the scale
screenPosition.x =
screenCenter.x + (screenPosition.x - screenCenter.x) *
scale;
screenPosition.y =
screenCenter.y + (screenPosition.y - screenCenter.y) *
scale;
// Convert back to world
space
transform.position =
Camera.ScreenToWorldPoint(screenPosition);
// Grow the local scale by
scale
transform.localScale *=
scale;
}
}
else
{
// Grow the local scale by scale
transform.localScale *= scale;
}
}
}
Universitas Sumatera Utara
Script GoTo,Back, Unduh dan Exit :
using UnityEngine;
using System.Collections;
using UnityEngine.UI;
public class Event : MonoBehaviour {
public GameObject panel;
public void start (int mulaistart){
Application.LoadLevel (mulaistart);
}
public void ExitApplication(){
ExitApplication ();
}
public void Exit(){
Application.Quit ();
}
public void URL (){
Application.OpenURL
("https://drive.google.com/open?id=0By8OhyrPnMkbDAxdjhDTGpxbDQ");
}
public void ShowPnl()
{
panel.gameObject.SetActive(true);
}
public void HidePnl()
{
panel.gameObject.SetActive (false);
}
}
Universitas Sumatera Utara
CURRICULUM VITAE
Identitas Pribadi
Nama Lengkap
: Azhari Hidayat
Nama akrab
: Ari
Tanggal Lahir
: 12 Januari 1994
Tempat Lahir
: Medan
Tinggi/ Berat badan
: 173 cm/ 80 kg
Jenis Kelamin
: Laki-laki
Status Perkawinan
: Belum Menikah
Agama
: Islam
Alamat
: Jalan Kesehatan Gg.Teratai 7 No.18
Nomor HP
: 081349509331
: azhari.hidayat29@gmail.com
Pendidikan Formal
Pendidikan
Sekolah
Tahun
SD
SDN 101770 – Deli Serdang
1999 – 2005
SMP
SMPN 1 Percut Sei Tuan – Deli Serdang
2005 – 2008
SMA
SMAN 11 Medan – Medan
2008 – 2011
Universitas
D3 Teknik Informatika USU – Sumatera Utara
2011 – 2014
Seminar / Workshop / Kursus
Training / Seminar / Workshop
Tempat
Tahun
Seminar Nasional Literasi Informasi USU, Sumatera Utara
2014
(SENARAI)
Pengalaman Organisasi dan Kepanitiaan
Tahun
Organisasi/Kepanitiaan
Posisi
2010-2011
Organisasi Pramuka
Anggota
Universitas Sumatera Utara