// Start is called before the first frame update void Start() { player1 = new Karakter(); player1.Name = "Albedo"; player1.Health = 100; player1.Damage = 30; Debug.Log("Name: " + player1.Name + ", Health: " + player1.Health + ", Damage: " + player1.Damage); player1.Jump(); }
// Use this for initialization void Start() { player1 = new Karakter(); player1.Name = "Dico"; player1.Health = 100; player1.Damage = 30; //Menampilkan hasil dari inisialisasi attribute Debug.Log("Name: " + player1.Name + ", Health: " + player1.Health + ", Damage: " + player1.Damage); //Memanggil metod dari salah satu method di class karakter. player1.Jump(); }