浏览代码

fix hit points

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

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


public Laser myLaser;
public GameObject myBody;
[HideInInspector]
[HideInInspector]
float m_HitPointsTotal;
[HideInInspector]
[HideInInspector]
[HideInInspector]
[HideInInspector]
float m_Cooldown;
public enum Role

if (role == Role.Healer)
{
m_RoleObs[0] = 1f;
m_HitPoints = .7f;
m_HitPointsTotal = .7f;
m_Damage = 0f;
m_Heal = .7f;
m_MoveSpeed = 10f;

else if (role == Role.DPS)
{
m_RoleObs[1] = 1f;
m_HitPoints = .6f;
m_HitPointsTotal = .6f;
m_Damage = .05f;
m_Heal = 0f;
m_MoveSpeed = 10f;

else if (role == Role.Tank)
{
m_RoleObs[2] = 1f;
m_HitPoints = 1f;
m_HitPointsTotal = 1f;
m_Damage = .02f;
m_Heal = .2f;
m_MoveSpeed = 6f;

public override void OnEpisodeBegin()
{
gameObject.SetActive(true);
m_HitPoints = 1f;
m_HitPoints = m_HitPointsTotal;
HealthStatus();
m_Dead = false;
m_Shoot = false;

正在加载...
取消
保存