示例#1
0
    private void ReadyThrow2(masterBallStruct ball)
    {
        var myBeamScript = Instantiate(targetingBeamPrefab, Vector3.zero, Quaternion.identity).GetComponent <fielderTargetingLineRenderer>();

        myBeamScript.SetUp(ball.myThrowSpeed, ball.myIndex, player.transform, pitcher, (pitcherTarget.position - pitcher.position).normalized);

        StartCoroutine(ThrowDelay());
    }
示例#2
0
    //Between this and the next comment is entirely setup of variables for the ball list
    public void AddThisBallToTheList(int Index, int taunt, Transform fielders)
    {
        masterBallStruct thisBall = new masterBallStruct();

        thisBall.myIndex      = Index;
        thisBall.myTauntLevel = taunt;
        thisBall.myFielders   = new List <Transform>();
        thisBall = AssignRemainingVariables(thisBall);
        thisBall = hUDScript.addBallToTheUI(thisBall);
        masterBallList.Add(thisBall);
    }
示例#3
0
 public masterBallStruct changeBallUISpriteToCorrectColor(masterBallStruct ball, BallResult myResult)
 {
     ball.uIObject.GetComponentInChildren <Image>().sprite = BallIconHolder.GetIcon(myResult, ball.myTauntLevel);
     return(ball);
 }
示例#4
0
 public masterBallStruct addBallToTheUI(masterBallStruct ball)
 {
     ball.uIObject = Instantiate(ballIconObject, ballIconHolder);
     ball.uIObject.GetComponentInChildren <Image>().sprite = BallIconHolder.GetIcon(BallResult.UNTHROWN, ball.myTauntLevel);
     return(ball);
 }
示例#5
0
    private masterBallStruct SetType(masterBallStruct thisball)
    {
        int myTypeNumber;

        switch (thisball.myTauntLevel)
        {
        case 0:
            thisball.myType = ballType.STANDARD;
            return(thisball);

        case 1:
            myTypeNumber = Random.Range(0, 3);
            if (myTypeNumber == 2)
            {
                thisball.myType = ballType.ARC;
            }
            else
            {
                thisball.myType = ballType.STANDARD;
            }
            return(thisball);

        case 2:
            myTypeNumber = Random.Range(0, 5);
            if (myTypeNumber == 2 || myTypeNumber == 3)
            {
                thisball.myType = ballType.ARC;
            }
            else if (myTypeNumber == 4)
            {
                thisball.myType = ballType.MULTI;
            }
            else
            {
                thisball.myType = ballType.STANDARD;
            }
            return(thisball);

        case 3:
            myTypeNumber = Random.Range(0, 7);
            if (myTypeNumber == 2 || myTypeNumber == 3)
            {
                thisball.myType = ballType.ARC;
            }
            else if (myTypeNumber == 4 || myTypeNumber == 5)
            {
                thisball.myType = ballType.MULTI;
            }
            else if (myTypeNumber == 6)
            {
                thisball.myType = ballType.SCATTER;
            }
            else
            {
                thisball.myType = ballType.STANDARD;
            }
            return(thisball);

        default:
            myTypeNumber = Random.Range(0, 8);
            if (myTypeNumber == 2 || myTypeNumber == 3)
            {
                thisball.myType = ballType.ARC;
            }
            else if (myTypeNumber == 4 || myTypeNumber == 5)
            {
                thisball.myType = ballType.MULTI;
            }
            else if (myTypeNumber == 6 || myTypeNumber == 7)
            {
                thisball.myType = ballType.SCATTER;
            }
            else
            {
                thisball.myType = ballType.STANDARD;
            }
            return(thisball);
        }
    }
示例#6
0
 private masterBallStruct ScatterBallSetup(masterBallStruct thisball)
 {
     thisball.myThrowSpeed = 1.2f + (2 / thisball.myTauntLevel + 1);
     thisball.myReadySpeed = 0.3f + (2 / thisball.myTauntLevel + 1);
     return(thisball);
 }
示例#7
0
 private masterBallStruct StandardBallSetup(masterBallStruct thisball)
 {
     thisball.myThrowSpeed = 0.5f + (2 / (thisball.myTauntLevel + 1));
     thisball.myReadySpeed = 0.5f + (2 / (thisball.myTauntLevel + 1));
     return(thisball);
 }