コード例 #1
0
 public PlayerDetails(AiReactionTime reaction, InputMoterMode moterMode, bool enabled, string name = "")
 {
     Name        = name;
     Enabled     = enabled;
     IsPlayer    = GameManager.GetIsPlayer(moterMode);
     AiMoterMode = moterMode;
     aiReaction  = reaction;
 }
コード例 #2
0
 public PlayerDetails(bool isPlayer = false)
 {
     Name        = "";
     Enabled     = false;
     IsPlayer    = isPlayer;
     AiMoterMode = InputMoterMode.BallOnly;
     aiReaction  = AiReactionTime.Normal;
 }
コード例 #3
0
    public static float GetReactionTime(AiReactionTime reaction)
    {
        switch (reaction)
        {
        case AiReactionTime.Slow:    return(2f);

        case AiReactionTime.Normal:  return(1.5f);

        case AiReactionTime.Fast:    return(1f);

        case AiReactionTime.Broken:  return(0.5f);

        case AiReactionTime.Instant: return(Time.fixedTime);

        default:                     return(2f);
        }
    }
コード例 #4
0
ファイル: GameManager.cs プロジェクト: JMiles42/Rowket-League
    public PlayerMotorInputBase GetInputClass(InputMoterMode moterMode, AiReactionTime time)
    {
        //Check if it is a player
        switch (moterMode)
        {
        case InputMoterMode.PlayerOne:   return(PlayerOneInput);

        case InputMoterMode.PlayerTwo:   return(PlayerTwoInput);

        case InputMoterMode.PlayerThree: return(PlayerThreeInput);

        case InputMoterMode.PlayerFour:  return(PlayerFourInput);
        }

        for (int i = 0, j = AiInputSystems.Length; i < j; i++)
        {
            if ((AiInputSystems[i].AiMoterMode == moterMode) && (AiInputSystems[i].ReactionTime == time))
            {
                return(AiInputSystems[i]);
            }
        }

        return(AiInputSystems[Ran.Range(0, AiInputSystems.Length)]);
    }
コード例 #5
0
 private void GetAiReactionTimeFromDropDown(int value)
 {
     aiReactionTime = (AiReactionTime)value;
 }