- Updated mirror image visuals - New Vamp/Cultist/Satanist ability: Bat Swarm - Updated Channeled abilities to have a cost per tick, and lowered initial costs significantly to take this into consideration.
50 lines
1.8 KiB
C#
50 lines
1.8 KiB
C#
using Photon.Pun;
|
|
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
|
|
[CreateAssetMenu(fileName = "ChanneledAbility", menuName = "RiftMayhem/AbilitySystem/Abilities/Channeled Ability", order = 0)]
|
|
public class ChanneledAbility : BaseAbility
|
|
{
|
|
public GameObject prefab;
|
|
|
|
public float duration;
|
|
public float radius;
|
|
public bool canHitSelf;
|
|
public bool followUser;
|
|
public bool allowAiming;
|
|
|
|
public float healthCostPerTick;
|
|
public float manaCostPerTick;
|
|
|
|
|
|
protected GameObject instanciatedAbility;
|
|
private NetworkedChanneling networkedChanneling;
|
|
|
|
public virtual NetworkedChanneling ExecuteChannel(PhotonView user, Taggable userTag, ref Coroutine channelingCoroutine)
|
|
{
|
|
base.Execute(user, userTag);
|
|
|
|
instanciatedAbility = PhotonNetwork.Instantiate("Abilities/" + prefab.name, user.GetComponentInChildren<ProjectileSpawnLocationController>().transform.position, user.GetComponentInChildren<ProjectileSpawnLocationController>().transform.rotation);
|
|
|
|
networkedChanneling = instanciatedAbility.GetComponent<NetworkedChanneling>();
|
|
|
|
networkedChanneling.owner = user;
|
|
networkedChanneling.ownerTag = userTag;
|
|
networkedChanneling.ability = this;
|
|
networkedChanneling.duration = duration;
|
|
networkedChanneling.radius = radius;
|
|
networkedChanneling.canHitSelf = canHitSelf;
|
|
networkedChanneling.followUser = followUser;
|
|
networkedChanneling.allowAiming = allowAiming;
|
|
networkedChanneling.healthCostPerTick = healthCostPerTick;
|
|
networkedChanneling.manaCostPerTick = manaCostPerTick;
|
|
networkedChanneling.ownerHealth = user.GetComponent<Health>();
|
|
networkedChanneling.ownerMana = user.GetComponent<Mana>();
|
|
|
|
networkedChanneling.Init(ref channelingCoroutine);
|
|
|
|
return networkedChanneling;
|
|
}
|
|
}
|