Implementasi Augmented Reality Dalam Pembuatan Media Informasi Wisata Sejarah Kota Medan Pada Platform Android
A-1
LISTING PROGRAM
1.
Fungsi Splashscreen
using UnityEngine;
using System.Collections;
public class splashscreen : MonoBehaviour {
public float timer =4; // waktu delay
public void Update(){
timer -= Time.deltaTime; // hitung mundur
if (timer > 0){
Debug.Log(timer);
}else {
Application.LoadLevel(1); // jika timer < 0
maka akan secara otomatis berpindah ke Main Menu Aplikasi
(LoadLevel(1))
}
}
}
2.
Fungsi Main Menu
using UnityEngine;
using System.Collections;
public class menu : MonoBehaviour {
public void KeluarAplikasi(string KeluarAplikasi)
{
Application.Quit();
}
public void scan(string scan)
{
Application.LoadLevel(2);
}
}
Universitas Sumatera Utara
A-2
3.
Fungsi About
using UnityEngine;
using System.Collections;
public class popup : MonoBehaviour {
public Canvas PilihCanvas;
public bool show = false;
public void Showpopup()
{
if(show == true){
show = false;
PilihCanvas.enabled = false;
}
else if (show == false){
show = true;
PilihCanvas.enabled = true;
}
}
}
4.
Fungsi Rotate
using UnityEngine;
using System.Collections;
using System.IO;
public class rotaterepeat : MonoBehaviour
{
public float scalingSpeed = 0.03f;
public float rotationSpeed = 70.0f;
public float translationSpeed = 5.0f;
//
public GameObject Model;
bool repeatRotateRight = false;
void Update ()
{
if (repeatRotateRight) {
RotationRightButton ();
}
Universitas Sumatera Utara
A-3
}
public void CloseAppButton ()
{
Application.Quit ();
}
public void RotationRightButton ()
{
//
transform.Rotate
(0,
-rotationSpeed
Time.deltaTime, 0);
GameObject.FindWithTag("Model")
.transform.Rotate(0, -rotationSpeed * Time.deltaTime, 0);
*
}
public void RotationRightButtonRepeat ()
{
//
transform.Rotate
(0,
-rotationSpeed
Time.deltaTime, 0);
repeatRotateRight=true;
}
*
public void RotateRightButtonOff ()
{
repeatRotateRight = false;
Debug.Log ("Off");
}
public void AnyButton ()
{
Debug.Log ("Any");
}
}
5.
Fungsi Zoom
using UnityEngine;
using System.Collections;
public class zoom : MonoBehaviour {
private float nilaiI =1f; //nilai interval pada slider
Universitas Sumatera Utara
A-4
public GameObject objek1,objek2,objek3,objek4,objek5; //
objek yang akan di zoom
public GUIStyle backgroundstyle;
public GUIStyle thumbstyle;
//Inisialisasi
void Start () {
nilaiI = 1f;
}
// pemanggilan perfame
void Update () {
objek1.transform.localScale = new Vector3(0.023f,
0.023f, 0.023f) * nilaiI * 1f; //pengaturan ukuran objek dan
interval perubahan slider
objek2.transform.localScale = new Vector3(0.04f,
0.04f, 0.04f) * nilaiI * 1f;
objek3.transform.localScale = new Vector3(0.0163f,
0.0163f, 0.0163f) * nilaiI * 1f;
objek4.transform.localScale = new Vector3(0.0320f,
0.0320f, 0.0320f) * nilaiI * 1f;
objek5.transform.localScale = new Vector3(0.0245f,
0.0245f, 0.0245f) * nilaiI * 1f;
}
void OnGUI() //untuk menampilkan GUI slider
{
nilaiI = GUI.VerticalSlider (new Rect(100, 150,
500, 500) , nilaiI, 3.0f,1f, backgroundstyle, thumbstyle);
}
}
Universitas Sumatera Utara
B-1
CURRICULUM VITAE
-------------------------------------------------------------------------------------------------------Data Pribadi
Nama
: Suhaili Hamdi
Tempat/Tanggal Lahir
: Medan / 15 Agustus1992
Jenis Kelamin
: Laki-Laki
Tinggi/Berat Badan
: 165 cm / 64 kg
Agama
: Islam
Kewarganegaraan
: Indonesia
Status
: Belum Menikah
Alamat
: Jl. Persamaan Gg.Rahmat No. 73A,
Simp.Limun Medan, Sumatera Utara
No. Handphone
: 083194124949
Email
: [email protected]
-------------------------------------------------------------------------------------------------------Riwayat Pendidikan
[1998 – 2004]
: SD 017973 Kisaran
[2004 – 2007]
: SMP Negeri 6 Kisaran
[2007 – 2010]
: SMA Negeri 2 Medan
[2010 – 2015]
: S1 Ilmu Komputer Universitas Sumatera Utara
-------------------------------------------------------------------------------------------------------Kemampuan IT :
Mampu mengoperasikan Microsoft Office (Ms.Word, Ms.Excel,
Ms.Power Point).
Mampu mengoperasikan Adobe Photoshop, Adobe Illustrator, dan
Universitas Sumatera Utara
B-2
Corel Draw.
Mampu menggunakan bahasa pemrograman C#
Kemampuan Bahasa:
Bahasa Inggris
Bahasa Indonesia
Universitas Sumatera Utara
LISTING PROGRAM
1.
Fungsi Splashscreen
using UnityEngine;
using System.Collections;
public class splashscreen : MonoBehaviour {
public float timer =4; // waktu delay
public void Update(){
timer -= Time.deltaTime; // hitung mundur
if (timer > 0){
Debug.Log(timer);
}else {
Application.LoadLevel(1); // jika timer < 0
maka akan secara otomatis berpindah ke Main Menu Aplikasi
(LoadLevel(1))
}
}
}
2.
Fungsi Main Menu
using UnityEngine;
using System.Collections;
public class menu : MonoBehaviour {
public void KeluarAplikasi(string KeluarAplikasi)
{
Application.Quit();
}
public void scan(string scan)
{
Application.LoadLevel(2);
}
}
Universitas Sumatera Utara
A-2
3.
Fungsi About
using UnityEngine;
using System.Collections;
public class popup : MonoBehaviour {
public Canvas PilihCanvas;
public bool show = false;
public void Showpopup()
{
if(show == true){
show = false;
PilihCanvas.enabled = false;
}
else if (show == false){
show = true;
PilihCanvas.enabled = true;
}
}
}
4.
Fungsi Rotate
using UnityEngine;
using System.Collections;
using System.IO;
public class rotaterepeat : MonoBehaviour
{
public float scalingSpeed = 0.03f;
public float rotationSpeed = 70.0f;
public float translationSpeed = 5.0f;
//
public GameObject Model;
bool repeatRotateRight = false;
void Update ()
{
if (repeatRotateRight) {
RotationRightButton ();
}
Universitas Sumatera Utara
A-3
}
public void CloseAppButton ()
{
Application.Quit ();
}
public void RotationRightButton ()
{
//
transform.Rotate
(0,
-rotationSpeed
Time.deltaTime, 0);
GameObject.FindWithTag("Model")
.transform.Rotate(0, -rotationSpeed * Time.deltaTime, 0);
*
}
public void RotationRightButtonRepeat ()
{
//
transform.Rotate
(0,
-rotationSpeed
Time.deltaTime, 0);
repeatRotateRight=true;
}
*
public void RotateRightButtonOff ()
{
repeatRotateRight = false;
Debug.Log ("Off");
}
public void AnyButton ()
{
Debug.Log ("Any");
}
}
5.
Fungsi Zoom
using UnityEngine;
using System.Collections;
public class zoom : MonoBehaviour {
private float nilaiI =1f; //nilai interval pada slider
Universitas Sumatera Utara
A-4
public GameObject objek1,objek2,objek3,objek4,objek5; //
objek yang akan di zoom
public GUIStyle backgroundstyle;
public GUIStyle thumbstyle;
//Inisialisasi
void Start () {
nilaiI = 1f;
}
// pemanggilan perfame
void Update () {
objek1.transform.localScale = new Vector3(0.023f,
0.023f, 0.023f) * nilaiI * 1f; //pengaturan ukuran objek dan
interval perubahan slider
objek2.transform.localScale = new Vector3(0.04f,
0.04f, 0.04f) * nilaiI * 1f;
objek3.transform.localScale = new Vector3(0.0163f,
0.0163f, 0.0163f) * nilaiI * 1f;
objek4.transform.localScale = new Vector3(0.0320f,
0.0320f, 0.0320f) * nilaiI * 1f;
objek5.transform.localScale = new Vector3(0.0245f,
0.0245f, 0.0245f) * nilaiI * 1f;
}
void OnGUI() //untuk menampilkan GUI slider
{
nilaiI = GUI.VerticalSlider (new Rect(100, 150,
500, 500) , nilaiI, 3.0f,1f, backgroundstyle, thumbstyle);
}
}
Universitas Sumatera Utara
B-1
CURRICULUM VITAE
-------------------------------------------------------------------------------------------------------Data Pribadi
Nama
: Suhaili Hamdi
Tempat/Tanggal Lahir
: Medan / 15 Agustus1992
Jenis Kelamin
: Laki-Laki
Tinggi/Berat Badan
: 165 cm / 64 kg
Agama
: Islam
Kewarganegaraan
: Indonesia
Status
: Belum Menikah
Alamat
: Jl. Persamaan Gg.Rahmat No. 73A,
Simp.Limun Medan, Sumatera Utara
No. Handphone
: 083194124949
: [email protected]
-------------------------------------------------------------------------------------------------------Riwayat Pendidikan
[1998 – 2004]
: SD 017973 Kisaran
[2004 – 2007]
: SMP Negeri 6 Kisaran
[2007 – 2010]
: SMA Negeri 2 Medan
[2010 – 2015]
: S1 Ilmu Komputer Universitas Sumatera Utara
-------------------------------------------------------------------------------------------------------Kemampuan IT :
Mampu mengoperasikan Microsoft Office (Ms.Word, Ms.Excel,
Ms.Power Point).
Mampu mengoperasikan Adobe Photoshop, Adobe Illustrator, dan
Universitas Sumatera Utara
B-2
Corel Draw.
Mampu menggunakan bahasa pemrograman C#
Kemampuan Bahasa:
Bahasa Inggris
Bahasa Indonesia
Universitas Sumatera Utara