Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections;
- using System.Collections.Generic;
- using UnityEngine;
- public class Enemy : MonoBehaviour
- {
- protected int health;
- protected GameObject player;
- protected int damage;
- private bool isDead;
- public void ChangeHealth(int hp)
- {
- health += hp;
- }
- public virtual void Move()
- {
- }
- public virtual void Attack()
- {
- }
- private void Death()
- {
- isDead = true;
- GetComponent<Animator>().SetBool("death",isDead);
- GetComponent<Enemy>().enabled = false;
- }
- private void Start()
- {
- player = FindObjectOfType<PlayerController>().gameObject;
- }
- void Update()
- {
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment