예제 #1
0
    public void TargetShowDiceButton(NetworkConnection connection, int buttonSide)
    {
        ConflictPanel cp = UIReference.Instance.conflictPanel;

        cp.activateSideRollButton(buttonSide);
        ConflictPanel.OnRollClickedDelegate += conflictRollButtonClicked;
    }
예제 #2
0
    public void RpcShowConflictPanel(string leftName, bool leftIsDrone, string RightName, bool rightIsDrone)
    {
        ConflictPanel cp = UIReference.Instance.conflictPanel;

        cp.gameObject.SetActive(true);
        cp.Clear();
        cp.setCombatant1(leftName, leftIsDrone);
        cp.setCombatant2(RightName, rightIsDrone);
    }
예제 #3
0
    private void RpcDisplayConflictRoll(int[] diceValsLeft, int[] diceValsRight)
    {
        ConflictPanel cp = UIReference.Instance.conflictPanel;

        if (diceValsLeft != null)
        {
            StartCoroutine(conflictDiceAnimator(3f / diceValsLeft.Length, cp.LeftDiceTexts, diceValsLeft, cp.LeftDiceTotal, ConflictPanel.LEFTSIDE));
        }

        if (diceValsRight != null)
        {
            StartCoroutine(conflictDiceAnimator(3f / diceValsRight.Length, cp.RightDiceTexts, diceValsRight, cp.RightDiceTotal, ConflictPanel.RIGHTSIDE));
        }
    }
예제 #4
0
    private void diceAnimationComplete(int side)
    {
        ConflictPanel cp = UIReference.Instance.conflictPanel;

        if (side == ConflictPanel.LEFTSIDE)
        {
            cp.leftAnimComplete = true;
        }
        else
        {
            cp.rightAnimComplete = true;
        }
        if (cp.leftAnimComplete && cp.rightAnimComplete)
        {
            if (conflictManager.getLeftTotal() > conflictManager.getRightTotal())
            {
                RpcConflictLost(ConflictPanel.RIGHTSIDE);
            }
            else if (conflictManager.getLeftTotal() < conflictManager.getRightTotal())
            {
                RpcConflictLost(ConflictPanel.LEFTSIDE);
            }
        }
    }