Skip to content
Snippets Groups Projects
Commit 33cca7ad authored by Robin Halseth Sandvik's avatar Robin Halseth Sandvik
Browse files

Made BasicProjectile1 work.

parent e530b70d
No related branches found
No related tags found
1 merge request!24PrefabService & abilities
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;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment