|
|
|
|
|
|
BehaviorParameters m_BehaviorParameters; |
|
|
|
Vector3 m_Transform; |
|
|
|
|
|
|
|
private EnvironmentParameters m_ResetParams; |
|
|
|
|
|
|
|
m_Existential = 1f / maxStep; |
|
|
|
m_Existential = 1f / MaxStep; |
|
|
|
m_BehaviorParameters = gameObject.GetComponent<BehaviorParameters>(); |
|
|
|
if (m_BehaviorParameters.TeamId == (int)Team.Blue) |
|
|
|
{ |
|
|
|
|
|
|
m_LateralSpeed = 0.3f; |
|
|
|
m_ForwardSpeed = 1.3f; |
|
|
|
} |
|
|
|
else |
|
|
|
else |
|
|
|
{ |
|
|
|
m_LateralSpeed = 0.3f; |
|
|
|
m_ForwardSpeed = 1.0f; |
|
|
|
|
|
|
area.playerStates.Add(playerState); |
|
|
|
m_PlayerIndex = area.playerStates.IndexOf(playerState); |
|
|
|
playerState.playerIndex = m_PlayerIndex; |
|
|
|
|
|
|
|
m_ResetParams = Academy.Instance.EnvironmentParameters; |
|
|
|
} |
|
|
|
|
|
|
|
public void MoveAgent(float[] act) |
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
timePenalty = 0; |
|
|
|
m_BallTouch = SideChannelUtils.GetSideChannel<FloatPropertiesChannel>().GetPropertyWithDefault("ball_touch", 0); |
|
|
|
m_BallTouch = m_ResetParams.GetWithDefault("ball_touch", 0); |
|
|
|
if (team == Team.Purple) |
|
|
|
{ |
|
|
|
transform.rotation = Quaternion.Euler(0f, -90f, 0f); |
|
|
|