예제 #1
0
 public void BeginCast(Vector3 _position, PlayerBehaviour _playerOwner, BasicSpellBehaviour _basicSpell)
 {
     player         = _playerOwner;
     beginSpellCast = _position;
     basicSpell     = _basicSpell;
     // DebugManager.Instance.DebugText("Begin Cast:" + _position);
 }
예제 #2
0
    public void TouchExit(BaseEventData _data)
    {
        PointerEventData    pointerData = _data as PointerEventData;
        BasicSpellBehaviour playedSpell = HoldingCard(pointerData.pointerId);

        if (playedSpell)
        {
            playedSpell.EndCast(Camera.main.ScreenToWorldPoint(pointerData.position));
        }
    }
예제 #3
0
    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>();
    }
예제 #4
0
    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");
        }
    }
예제 #5
0
 public void BeginCast(Vector3 _position, PlayerBehaviour _playerOwner, BasicSpellBehaviour _basicSpell)
 {
     CreateObject(_position, debugTriangle);
 }