Exemple #1
0
 private void OnOpponentHealthClicked()
 {
     if (TurnPhases.IsCurrentPhase(TurnPhase.Main))
     {
         // DealDamageToOpponent(DamageDisplay.Damage);
         //DamageDisplay.SetDamageDisplayed(0);
     }
 }
Exemple #2
0
    public void DealDamageToOpponent()
    {
        if (MegaManager.CurrentPlayer.Damage != this)
        {
            return;
        }

        if (TurnPhases.IsCurrentPhase(TurnPhase.Main))
        {
            EventManager.DealDamageToPlayer(DamageInPool, MegaManager.CurrentOpponent);
            EmptyPool();
        }
    }
Exemple #3
0
    public override void OnMouseHold(Vector3 mousePos, Camera cam)
    {
        if (!_draggingCard && (!TurnPhases.IsCurrentPhase(TurnPhase.Main) || !MegaManager.CollectionManager.CheckIfCanAfford(Card.ManaCost)))
        {
            return;
        }

        ZoomOut();
        _draggingCard = true;
        RaycastHit hit;

        Debug.DrawRay(cam.transform.position, cam.ScreenToWorldPoint(mousePos + Vector3.forward * 1000000));
        if (Physics.Raycast(cam.ScreenPointToRay(mousePos), out hit, Mathf.Infinity, Card.MegaMan.TableLayerMask))
        {
            Transform.position = hit.point + Vector3.back * 1;
        }
        //Vector3 mousePlusDepth = mousePos + Vector3.forward * Vector3.Distance(cam.transform.position, originalHandPosition);
    }