2019-09-17 15:43:40 +02:00
|
|
|
|
using System.Collections;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using UnityEngine;
|
|
|
|
|
|
2019-09-17 18:52:55 +02:00
|
|
|
|
public class PlayerCharacter : AbstractCharacter
|
2019-09-17 15:43:40 +02:00
|
|
|
|
{
|
2019-09-17 18:52:55 +02:00
|
|
|
|
public override void Move(Vector2 movementDirection)
|
2019-09-17 15:43:40 +02:00
|
|
|
|
{
|
2019-09-17 18:52:55 +02:00
|
|
|
|
// TODO : Implement limits
|
|
|
|
|
_mover.Direction = movementDirection;
|
2019-09-17 15:43:40 +02:00
|
|
|
|
}
|
|
|
|
|
|
2019-09-17 18:52:55 +02:00
|
|
|
|
public override void Shoot()
|
2019-09-17 15:43:40 +02:00
|
|
|
|
{
|
2019-09-19 12:36:09 +02:00
|
|
|
|
_isShooting = true;
|
|
|
|
|
if (!_isDepleted && _shooter.Shoot(CurrentEnergy))
|
|
|
|
|
{
|
|
|
|
|
CurrentEnergy -= _shooter.EnergyCost;
|
|
|
|
|
}
|
|
|
|
|
else if (_isDepleted)
|
|
|
|
|
{
|
|
|
|
|
// Force regen when depleted even if holding the trigger
|
|
|
|
|
_isShooting = false;
|
|
|
|
|
}
|
2019-09-17 15:43:40 +02:00
|
|
|
|
}
|
2019-09-17 20:45:08 +02:00
|
|
|
|
|
|
|
|
|
protected override void Death()
|
|
|
|
|
{
|
|
|
|
|
throw new System.NotImplementedException();
|
|
|
|
|
}
|
2019-09-17 15:43:40 +02:00
|
|
|
|
}
|