void Start() { stats = GetComponent <Player>().charactersStats; player = GetComponent <Player>(); gameObject.AddComponent <AudioSource>(); audioSource.clip = audioClip; audioSource.playOnAwake = false; }
// Start is called before the first frame update void Start() { spawnProjectile = transform.Find("ProjectileSpawn"); //FindChild charactersStats = GetComponent <Player>().charactersStats; gameObject.AddComponent <AudioSource>(); audioSource.clip = audioClip; audioSource.playOnAwake = false; }
// Start is called before the first frame update void Start() { DropTable = new DropTable(); DropTable.loot = new List <LootDrop> { new LootDrop("Potion_Log", 30) }; Id = 1; Experience = 150; navAgent = GetComponent <NavMeshAgent>(); charactersStats = new CharactersStats(8, 7, 4); currentHealth = maxHealth; gameObject.AddComponent <AudioSource>(); audioSource.clip = audioClip; audioSource.playOnAwake = false; }
public void Consume(CharactersStats stats) { Debug.Log("You drank a potion. Nice !"); Destroy(gameObject); }
// Start is called before the first frame update void Start() { PlayerLevel = GetComponent <PlayerLevel>(); this.currentHealth = this.maxHealth; charactersStats = new CharactersStats(10, 10, 10); }