浏览代码

add turn speed

/develop/cubewars/splashdamage
Andrew Cohen 4 年前
当前提交
046e97f4
共有 1 个文件被更改,包括 7 次插入4 次删除
  1. 11
      Project/Assets/ML-Agents/Examples/CubeWars/Scripts/SmallCubeAgent.cs

11
Project/Assets/ML-Agents/Examples/CubeWars/Scripts/SmallCubeAgent.cs


Rigidbody m_AgentRb;
//float m_LaserLength;
// Speed of agent rotation.
public float turnSpeed;
float m_Bonus;
// Speed of agent movement.
public Material normalMaterial;

float m_Heal;
[HideInInspector]
float m_MoveSpeed;
[HideInInspector]
float m_TurnSpeed;
[HideInInspector]
float m_Cooldown;

m_Damage = 0f;
m_Heal = .7f;
m_MoveSpeed = 10f;
m_turnSpeed = 150f;
m_HitPoints = .5f;
m_HitPoints = .6f;
m_turnSpeed = 200f;
m_Cooldown = .25f;
}
else if (role == Role.Tank)

m_Heal = .2f;
m_MoveSpeed = 6f;
m_turnSpeed = 100f;
m_Cooldown = .4f;
}

m_ShootTime = Time.time;
}
}
transform.Rotate(rotateDir, Time.fixedDeltaTime * turnSpeed);
transform.Rotate(rotateDir, Time.fixedDeltaTime * m_TurnSpeed);
m_AgentRb.AddForce(dirToGo * m_MoveSpeed, ForceMode.VelocityChange);
}

正在加载...
取消
保存