Exemplo n.º 1
0
 public void BeginCast(Vector3 _position, PlayerBehaviour _playerOwner, BasicSpellBehaviour _basicSpell)
 {
     player         = _playerOwner;
     beginSpellCast = _position;
     basicSpell     = _basicSpell;
     // DebugManager.Instance.DebugText("Begin Cast:" + _position);
 }
Exemplo n.º 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));
        }
    }
Exemplo n.º 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>();
    }
Exemplo n.º 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");
        }
    }
Exemplo n.º 5
0
 public void BeginCast(Vector3 _position, PlayerBehaviour _playerOwner, BasicSpellBehaviour _basicSpell)
 {
     CreateObject(_position, debugTriangle);
 }