diff --git a/MrBigsock/Assets/Code/Core/Abilities/BasicProjectile1.cs b/MrBigsock/Assets/Code/Core/Abilities/BasicProjectile1.cs index b92dea6dbbca44f2f838dd7ec45ad064ef545bc1..b7e1e8189da0a411a88414cca0d135d37c661840 100644 --- a/MrBigsock/Assets/Code/Core/Abilities/BasicProjectile1.cs +++ b/MrBigsock/Assets/Code/Core/Abilities/BasicProjectile1.cs @@ -1,9 +1,11 @@ using System.Collections; using System; using System.Collections.Generic; + using UnityEngine; using UnityEngine.InputSystem; +using BigSock.Service; namespace BigSock { @@ -12,7 +14,8 @@ namespace BigSock { */ public class BasicProjectile1 : BaseAttack { //protected static readonly GameObject PROJECTILE_BASE = new AttackMovement(); - + public const string PROJECTILE_NAME = "attack"; + /* The attack stats of the ability. */ @@ -34,7 +37,10 @@ namespace BigSock { - Even if nothing was hit, used to indicate that cooldowns should be updated. This should be overridden in sub-classes for the actual abilities. */ - protected override bool Activate(Character actor, Vector2 target) { + protected override bool Activate(Character actor, Vector3? target) { + var bullet = PrefabService.SINGLETON.Instance(PROJECTILE_NAME, actor.transform.position); + bullet.GetComponent<AttackMovement>().Actor = actor; + //MonoBehaviour.Instantiate(PROJECTILE_BASE, (Vector3) actor.transform.position, PROJECTILE_BASE.transform.rotation); return true; }