void Start() { Skeleton = gameObject.AddComponent <IA_Skeleton_code>(); Skeleton.SetTarget(null); Skeleton.SetAnimator(animator); Skeleton.SetWeapon(Weapon); ((enemy_couroutine)Skeleton).SetAttackRange(2); ((enemy_couroutine)Skeleton).SetMoveSpeed(3); ((enemy_couroutine)Skeleton).SetAttackDelay(1); ((enemy_couroutine)Skeleton).SetAttackDammage(27); Skeleton.StartCoroutine("CheckEntity"); }
void Awake() { Skeleton = gameObject.AddComponent <IA_Skeleton_code>(); Skeleton.SetTarget(null); Skeleton.SetAnimator(animator); Skeleton.SetWeapon(Weapon); ((enemy_couroutine)Skeleton).SetAttackRange(2.5f); ((enemy_couroutine)Skeleton).SetMoveSpeed(1.5f); ((enemy_couroutine)Skeleton).SetAttackDelay(1.5f); ((enemy_couroutine)Skeleton).SetAttackDammage(15); ((enemy_couroutine)Skeleton).SetHealth(300); Skeleton.StartCoroutine("CheckEntity"); MaxHp = Skeleton.GetHealth(); }