public void BeginCast(Vector3 _position, PlayerBehaviour _playerOwner, BasicSpellBehaviour _basicSpell) { player = _playerOwner; beginSpellCast = _position; basicSpell = _basicSpell; // DebugManager.Instance.DebugText("Begin Cast:" + _position); }
public void TouchExit(BaseEventData _data) { PointerEventData pointerData = _data as PointerEventData; BasicSpellBehaviour playedSpell = HoldingCard(pointerData.pointerId); if (playedSpell) { playedSpell.EndCast(Camera.main.ScreenToWorldPoint(pointerData.position)); } }
public void BeginCast(Vector3 _position, PlayerBehaviour _playerOwner, BasicSpellBehaviour _basicSpell) { PV = GetComponent <PhotonView>(); player = _playerOwner; anchorPosition = _position; basicSpell = _basicSpell; shieldObject = new GameObject(); shieldObject.name = "shieldObject (" + _playerOwner.name + ")"; shieldObject.AddComponent <LifeTime>(); shieldObject.AddComponent <PhotonView>(); // shieldObject.AddComponent<ShieldBehaviour>(); shieldObject.GetComponent <LifeTime>().lifetime = 25f; //shield = shieldObject.GetComponent<ShieldBehaviour>(); }
public void TouchEnter(BaseEventData _data) { PointerEventData pointerData = _data as PointerEventData; Debug.Log("Enter"); BasicSpellBehaviour playedSpell = HoldingCard(pointerData.pointerId); if (playedSpell) { // DebugManager.Instance.DebugText("card selected"); playedSpell.CastSpell(Camera.main.ScreenToWorldPoint(pointerData.position)); } else { Debug.Log("No card selected"); } }
public void BeginCast(Vector3 _position, PlayerBehaviour _playerOwner, BasicSpellBehaviour _basicSpell) { CreateObject(_position, debugTriangle); }