Advertisement
diliupg

Enemy.cs

Jan 10th, 2019
297
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.53 KB | None | 0 0
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4.  
  5. public abstract class Enemy : MonoBehaviour
  6. {
  7.  
  8.     [SerializeField] protected int health;
  9.     [SerializeField] protected int gems;
  10.     [SerializeField] protected int speed;
  11.     [SerializeField] protected Transform pointA, pointB;
  12.  
  13.     public virtual void Attack() // virtual keywords allows child to write it;s own Attack code or use this
  14.     {
  15.         Debug.Log("base attack called by " + this.name);
  16.     }
  17.  
  18.     public abstract void Update();
  19.  
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement