Skip to content

Commit

Permalink
v0.1 basic AI setup
Browse files Browse the repository at this point in the history
  • Loading branch information
thedoctormarc committed Apr 14, 2021
1 parent 1b72ef9 commit e3fd05e
Show file tree
Hide file tree
Showing 20 changed files with 4,906 additions and 10,875 deletions.
29 changes: 29 additions & 0 deletions Automation Project/Assets/CameraManager.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class CameraManager : MonoBehaviour
{

int index;
int pCount;

// Start is called before the first frame update
void Start()
{
index = 0;
pCount = PlayerManager.instance.transform.childCount;
PlayerManager.instance.GetChildByIndex(0).transform.Find("Line Of Sight").gameObject.SetActive(true);
}

// Update is called once per frame
void Update()
{
if (Input.GetKeyDown(KeyCode.RightArrow) == true)
{
PlayerManager.instance.GetChildByIndex(index).transform.Find("Line Of Sight").gameObject.SetActive(false);
index = (++index > pCount - 1) ? 0 : index;
PlayerManager.instance.GetChildByIndex(index).transform.Find("Line Of Sight").gameObject.SetActive(true);
}
}
}
11 changes: 11 additions & 0 deletions Automation Project/Assets/CameraManager.cs.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions Automation Project/Assets/Character/Prefab.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit e3fd05e

Please sign in to comment.