Skip to content

Commit

Permalink
chore: implement changes
Browse files Browse the repository at this point in the history
  • Loading branch information
SSelinn committed Jun 25, 2024
1 parent 2649ac8 commit c54cb1a
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions aplib.net-demo/Assets/Testing/AplibTests/KeyTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@

namespace Testing.AplibTests
{
public class AAKeyTests
public class ASimpleKeyTests
{
private const string _sceneName = "KeyDoorTest";

[SetUp]
public void SetUpScene()
{
Debug.Log($"Starting {nameof(AAKeyTests)}");
Debug.Log($"Starting {nameof(ASimpleKeyTests)}");
SceneManager.LoadScene(_sceneName);
}

Expand All @@ -37,11 +37,7 @@ public class KeyDoorBeliefSet : BeliefSet
/// <summary>
/// Player object in the scene.
/// </summary>
public Belief<GameObject, GameObject> Player = new(GameObject.Find("Player"), p =>
{
// Debug.Log(p.transform.position);
return p;
});
public GameObject Player { get; } = GameObject.Find("Player");

/// <summary>
/// Door position in the scene.
Expand All @@ -55,7 +51,7 @@ public class KeyDoorBeliefSet : BeliefSet
public Belief<GameObject, bool> IsDoorOpen = new
(
GameObject.FindGameObjectWithTag("Door"),
x => x == null
door => door == null
);
}

Expand Down Expand Up @@ -114,7 +110,7 @@ public IEnumerator FindKeyAndCorrectDoorOpensTest()
// Check if player has reached the door.
bool IsNextToDoor(KeyDoorBeliefSet beliefSet)
{
Transform player = beliefSet.Player.Observation.transform;
Transform player = beliefSet.Player.transform;
Vector3 door = beliefSet.DoorPosition;

if (player.position.z > 4.3f) return true;
Expand Down

0 comments on commit c54cb1a

Please sign in to comment.