Example #1
0
        static void Main(string[] args)
        {
            Enemy bigEnemy   = new BigEnemy(new BigGun());
            Enemy smallEnemy = new SmallEnemy(new SmallGun());

            bigEnemy.Attack();
            smallEnemy.Attack();
        }
Example #2
0
 private void Start()
 {
     parent = FindObjectOfType <BigEnemy>();
 }