浏览代码

Reduce dragon damage

/develop/cubewars/splashdamage
Ervin Teng 4 年前
当前提交
6ccf3b36
共有 1 个文件被更改,包括 3 次插入1 次删除
  1. 4
      Project/Assets/ML-Agents/Examples/CubeWars/Scripts/LargeCubeAgent.cs

4
Project/Assets/ML-Agents/Examples/CubeWars/Scripts/LargeCubeAgent.cs


// Speed of agent movement.
public float moveSpeed;
public float fireDamage = 0.25f;
public Material normalMaterial;
public Material weakMaterial;
public Material deadMaterial;

{
if (hit.collider.gameObject.CompareTag("StrongSmallAgent") || hit.collider.gameObject.CompareTag("WeakSmallAgent"))
{
hit.collider.gameObject.GetComponent<SmallCubeAgent>().HitAgent(.4f);
hit.collider.gameObject.GetComponent<SmallCubeAgent>().HitAgent(fireDamage);
AddReward(.1f);
}
else if (hit.collider.gameObject.CompareTag("StrongLargeAgent") || hit.collider.gameObject.CompareTag("WeakLargeAgent"))

正在加载...
取消
保存