Beispiel #1
0
    public void HitBallAction(GameObject actionUser)
    {
        //BATTER TURN
        GameObject      batter = TeamUtils.GetPlayerTeamMember(PlayerFieldPositionEnum.BATTER, TeamUtils.GetPlayerIdFromPlayerFieldPosition(PlayerFieldPositionEnum.BATTER));
        BatterBehaviour batterBehaviourScript = PlayerUtils.FetchBatterBehaviourScript(batter);

        batterBehaviourScript.IsReadyToSwing     = true;
        batterBehaviourScript.IsSwingHasFinished = false;

        if (PlayerUtils.HasBatterPosition(batter))
        {
            PlayerStatus playerStatusScript = PlayerUtils.FetchPlayerStatusScript(batter);
            batterBehaviourScript.CalculateBatterColliderInterraction(PitcherGameObject, BallControllerScript, playerStatusScript);
        }
    }