Skip to content

Commit

Permalink
Resources Up/ NavMesh Not Yet Working
Browse files Browse the repository at this point in the history
  • Loading branch information
IssamAbushaban committed Nov 13, 2020
1 parent 7dab529 commit ab73519
Show file tree
Hide file tree
Showing 17 changed files with 212,230 additions and 2,462 deletions.
11 changes: 6 additions & 5 deletions OdysseyNow/Assets/ModeDirector.cs
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ private void StartHauntedHouse()
calibration.SetActive(false);
var p1 = ElementSettings.FindFromNameAndTag("PlayerTarget", "Player1");
var p2 = ElementSettings.FindFromNameAndTag("PlayerTarget", "Player2");
var game = AI.transform.Find("CatAndMouse").gameObject;
var game = AI.transform.Find("HauntedHouse").gameObject;

var p1Input = (LocalInputManager.ControlScheme)System.Enum.Parse(typeof(LocalInputManager.ControlScheme),
PlayerPrefs.GetString("P1Input"));
Expand All @@ -120,15 +120,16 @@ private void StartHauntedHouse()
if (p1Input == LocalInputManager.ControlScheme.AI)
{
p1.GetComponent<NavMeshAgent>().enabled = true;
game.GetComponent<CatAI>().enabled = true;
game.GetComponent<CatAI>().level = PlayerPrefs.GetInt("ai1");
game.GetComponent<GhostAI>().enabled = true;
game.GetComponent<GhostAI>().level = PlayerPrefs.GetInt("ai1");
}

if (p2Input == LocalInputManager.ControlScheme.AI)
{
Debug.Log("This needs to not be allowed.");
p2.GetComponent<NavMeshAgent>().enabled = true;
game.GetComponent<MouseAI>().enabled = true;
game.GetComponent<MouseAI>().level = PlayerPrefs.GetInt("ai2");
game.GetComponent<GhostAI>().enabled = true;
game.GetComponent<GhostAI>().level = PlayerPrefs.GetInt("ai2");
}

if (p1Input == LocalInputManager.ControlScheme.AI || p2Input == LocalInputManager.ControlScheme.AI)
Expand Down
Loading

0 comments on commit ab73519

Please sign in to comment.