2019-09-19 15:50:10 +02:00
|
|
|
|
using System;
|
|
|
|
|
using System.Collections;
|
2019-09-17 15:43:40 +02:00
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using UnityEngine;
|
|
|
|
|
|
2019-09-19 15:50:10 +02:00
|
|
|
|
public class EnemyCharacter : AbstractCharacter
|
2019-09-17 15:43:40 +02:00
|
|
|
|
{
|
2019-09-19 15:50:10 +02:00
|
|
|
|
public override void Move(Vector2 movementDirection)
|
2019-09-17 15:43:40 +02:00
|
|
|
|
{
|
2019-09-19 15:50:10 +02:00
|
|
|
|
_mover.Direction = movementDirection;
|
2019-09-17 15:43:40 +02:00
|
|
|
|
}
|
|
|
|
|
|
2019-09-19 15:50:10 +02:00
|
|
|
|
public override void Shoot()
|
2019-09-17 15:43:40 +02:00
|
|
|
|
{
|
2019-09-19 15:50:10 +02:00
|
|
|
|
// Always shoot
|
|
|
|
|
_shooter.Shoot(_shooter.EnergyCost+1);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// TODO : Gain points, maybe through Events?
|
|
|
|
|
protected override void Death()
|
|
|
|
|
{
|
|
|
|
|
Destroy(gameObject);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Don't gain points
|
|
|
|
|
private void OnBecameInvisible()
|
|
|
|
|
{
|
|
|
|
|
Destroy(gameObject);
|
2019-09-17 15:43:40 +02:00
|
|
|
|
}
|
|
|
|
|
}
|