浏览代码

about to update editor ver

/hh-develop-fps_game_project
HH 4 年前
当前提交
adfdeebf
共有 4 个文件被更改,包括 798 次插入32 次删除
  1. 2
      Project/Assets/ML-Agents/Examples/FPS_Game/Prefabs/Projectile.prefab
  2. 815
      Project/Assets/ML-Agents/Examples/FPS_Game/Scenes/FPS_Game.unity
  3. 4
      Project/Assets/ML-Agents/Examples/FPS_Game/Scripts/FPSAgent.cs
  4. 9
      Project/Assets/ML-Agents/Examples/FPS_Game/Scripts/MultiGunAlternating.cs

2
Project/Assets/ML-Agents/Examples/FPS_Game/Prefabs/Projectile.prefab


m_Mass: 1
m_Drag: 0
m_AngularDrag: 0.05
m_UseGravity: 0
m_UseGravity: 1
m_IsKinematic: 0
m_Interpolate: 0
m_Constraints: 0

815
Project/Assets/ML-Agents/Examples/FPS_Game/Scenes/FPS_Game.unity
文件差异内容过多而无法显示
查看文件

4
Project/Assets/ML-Agents/Examples/FPS_Game/Scripts/FPSAgent.cs


m_InputH = 0;
if (leftStrafe)
{
print("leftstrafe");
// print("leftstrafe");
print("rightstrafe");
// print("rightstrafe");
m_InputH += 1;
rightStrafe = false;
}

9
Project/Assets/ML-Agents/Examples/FPS_Game/Scripts/MultiGunAlternating.cs


private float shootTimer;
public bool coolDownComplete;
[Header("COOLDOWN & RELOAD")]
public float CurrentAmmoPercentage = 100; //the amount of ammo we currently have on a scale between 0-100
public float DepletionRate = .02f; //constant rate at which ammo depletes when being used
public float RegenRate = .01f; //constant rate at which ammo regenerates
CurrentAmmoPercentage = 100;
}
// Update is called once per frame

if (coolDownComplete)
{
ShootGunAtIndex(currentGunIndex);
CurrentAmmoPercentage = Mathf.Clamp(CurrentAmmoPercentage - DepletionRate, 0, 100);
}
}

}
// }
shootTimer += Time.fixedDeltaTime;
CurrentAmmoPercentage = Mathf.Clamp(CurrentAmmoPercentage + RegenRate, 0, 100);
}

正在加载...
取消
保存