using System.Collections; using System.Collections.Generic; using UnityEngine; public class Archer : Ally { public enum SkillArcher{ FireArrow = 0, PoisonArrow = 1 } public SkillArcher skillArcher = 0; public GameObject fireArrow; public GameObject poisonArrow; float fireDamage = 5; float poisonDamage = 5; public override void Start() { base.Start(); } public override void Update() { base.Update(); if(IsEnemyDetected) { AttackEnemy(); } } public void ChangeProjectile(GameObject gameObject) { } public void activateSkill(Ally ally){ if(PlayerPrefs.GetInt("Skill " + skillArcher) == 1){ Debug.Log("Fire Arrow"); } if (PlayerPrefs.GetInt("Skill " + 1) == 1){ Debug.Log("Poison Arrow"); } } void AttackEnemy() { //Attack Cooldown if(AttackInterval < AttackSpeedWait) { Animation.PlayAttackAnim(); AttackSpeedWait = 0f; } AttackSpeedWait += Time.deltaTime; } }