using Photon.Pun; using System.Collections; using System.Collections.Generic; using UnityEngine; [CreateAssetMenu(fileName = "SummonAbility", menuName = "RiftMayhem/AbilitySystem/Abilities/Summon Ability", order = 0)] public class SummonAbility : BaseAbility { public GameObject minionPrefab; private GameObject instantiatedMinion; public override void Execute(PhotonView user, Taggable userTag) { base.Execute(user, userTag); Debug.Log($"Player {user.name} casted {this.name} and spent {manaCost} mana."); instantiatedMinion = PhotonNetwork.Instantiate("Abilities/" + minionPrefab.name, user.GetComponentInChildren().transform.position, user.GetComponentInChildren().transform.rotation); } public override void Execute(PhotonView user, Taggable userTag, Vector3 point) { base.Execute(user, userTag); Debug.Log($"Player {user.name} casted {this.name} and spent {manaCost} mana."); instantiatedMinion = PhotonNetwork.Instantiate("Abilities/" + minionPrefab.name, user.GetComponentInChildren().transform.position, user.GetComponentInChildren().transform.rotation); } public override void Execute(PhotonView user, Taggable userTag, Transform target) { base.Execute(user, userTag); Debug.Log($"Player {user.name} casted {this.name} and spent {manaCost} mana."); instantiatedMinion = PhotonNetwork.Instantiate("Abilities/" + minionPrefab.name, user.GetComponentInChildren().transform.position, user.GetComponentInChildren().transform.rotation); } }