Download Project/Assets/ML-Agents/Examples/Sorter/Scripts/NumberTile.cs from ashish2244/ppo-SnowballTarget: direct link, hf CLI and curl.
- Browser
- Download file 663 Bytes
-
https://huggingface.co/ashish2244/ppo-SnowballTarget/resolve/main/Project/Assets/ML-Agents/Examples/Sorter/Scripts/NumberTile.cs
- Command line
-
hf download hf://ashish2244/ppo-SnowballTarget/Project/Assets/ML-Agents/Examples/Sorter/Scripts/NumberTile.cs
-
curl -L -o NumberTile.cs https://huggingface.co/ashish2244/ppo-SnowballTarget/resolve/main/Project/Assets/ML-Agents/Examples/Sorter/Scripts/NumberTile.cs
663 Bytes
| using UnityEngine; | |
| public class NumberTile : MonoBehaviour | |
| { | |
| public int NumberValue; | |
| public Material DefaultMaterial; | |
| public Material SuccessMaterial; | |
| private bool m_Visited; | |
| private MeshRenderer m_Renderer; | |
| public bool IsVisited | |
| { | |
| get { return m_Visited; } | |
| } | |
| public void VisitTile() | |
| { | |
| m_Renderer.sharedMaterial = SuccessMaterial; | |
| m_Visited = true; | |
| } | |
| public void ResetTile() | |
| { | |
| if (m_Renderer is null) | |
| { | |
| m_Renderer = GetComponentInChildren<MeshRenderer>(); | |
| } | |
| m_Renderer.sharedMaterial = DefaultMaterial; | |
| m_Visited = false; | |
| } | |
| } | |