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