Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
73 commits
Select commit Hold shift + click to select a range
5878655
added vuforia
LightningToast Feb 25, 2018
c8dd3b8
added gun
LightningToast Feb 25, 2018
a5749a4
Modified AR scaling
LightningToast Feb 25, 2018
943a881
VR integration
LightningToast Feb 25, 2018
70123d1
added door
LightningToast Feb 25, 2018
a5ef625
Door Mechanism
LightningToast Feb 25, 2018
70cfdb3
added a wall
LightningToast Feb 25, 2018
4b48dc6
adjusted snap thresholds
LightningToast Feb 25, 2018
df7e2c4
movement tweaks
LightningToast Feb 25, 2018
371a1a6
character tweaks
LightningToast Feb 25, 2018
2992d8c
changes
LightningToast Feb 25, 2018
6f9922d
moved center cube
LightningToast Feb 25, 2018
7246dcc
prefab tweaks
LightningToast Feb 25, 2018
f685ce2
Added Holograms for AR
LightningToast Feb 25, 2018
e72268e
removed prefab
LightningToast Feb 25, 2018
a55945b
Removed physics from character
LightningToast Feb 25, 2018
298b6e5
visibility tweaks
LightningToast Feb 25, 2018
e4b3c0e
added indicator rings
LightningToast Feb 25, 2018
2885919
added guns
LightningToast Feb 25, 2018
fa75730
changed spawn
LightningToast Feb 25, 2018
c4cddbf
changes to spawn
LightningToast Feb 25, 2018
f8763ce
changes to spawn
LightningToast Feb 25, 2018
049512f
added indicator ring to network manager
LightningToast Feb 25, 2018
2b9c663
move rings
LightningToast Feb 25, 2018
0da08fe
Indicator movement
LightningToast Feb 25, 2018
ffcf4cc
add ring move to separate class
LightningToast Feb 25, 2018
82fc9ed
added rendering options
LightningToast Feb 25, 2018
4a15212
added bullet
LightningToast Feb 25, 2018
d5e6fe7
render
LightningToast Feb 25, 2018
ab66eb9
added rb to door
LightningToast Feb 25, 2018
1d748c6
Bounds
LightningToast Feb 25, 2018
fa2291c
hard coded
LightningToast Feb 25, 2018
7862d1c
move indicator based on teleporter
LightningToast Feb 25, 2018
68b217d
Fixed Teleport Indicator
LightningToast Feb 25, 2018
0814b14
fix to indicator
LightningToast Feb 25, 2018
39bf388
tweaked layers
LightningToast Feb 25, 2018
6f7bd20
added bullet
LightningToast Feb 25, 2018
a3f0b7e
door logic change
LightningToast Feb 25, 2018
9318b7a
lightning effects
LightningToast Feb 25, 2018
d3dbfb4
added gun visuals
LightningToast Feb 25, 2018
2fe2718
gun tweaks
LightningToast Feb 25, 2018
0a825a2
Added robots
LightningToast Feb 25, 2018
c8c6795
Robot prefabs
LightningToast Feb 25, 2018
1839ef8
changes to robots
LightningToast Feb 25, 2018
ad45608
added walls
LightningToast Feb 25, 2018
fd1b446
gameOver
LightningToast Feb 25, 2018
2d64ead
VR Walls
LightningToast Feb 25, 2018
96fc660
fgsd
LightningToast Feb 25, 2018
677069f
changes
LightningToast Feb 25, 2018
a4e1c85
door
LightningToast Feb 25, 2018
61d300c
door
LightningToast Feb 25, 2018
70b6af5
sdfsdf
LightningToast Feb 25, 2018
72d1f14
sas
LightningToast Feb 25, 2018
d205b66
word changes
LightningToast Feb 25, 2018
942c7b8
adsfa
LightningToast Feb 25, 2018
7e6a71f
door
LightningToast Feb 25, 2018
c36b8ea
door
LightningToast Feb 25, 2018
7ae5dc3
adfadsf
LightningToast Feb 25, 2018
a301518
dasfads
LightningToast Feb 25, 2018
1d3aee5
changes
LightningToast Feb 27, 2018
aaeaa20
door control
LightningToast Feb 27, 2018
7a9a7db
fix
LightningToast Feb 27, 2018
d486d1e
door
LightningToast Feb 27, 2018
d5d3fa9
door
LightningToast Feb 27, 2018
d3d1bec
door
LightningToast Feb 27, 2018
f72ee8a
gz
LightningToast Feb 27, 2018
5fca501
door
LightningToast Feb 27, 2018
508023a
door
LightningToast Feb 27, 2018
c150db1
dfg
LightningToast Feb 27, 2018
66c21cb
sgf
LightningToast Feb 27, 2018
224b71d
sdf
LightningToast Feb 27, 2018
473c362
adfssdaf
LightningToast Feb 27, 2018
6e9365e
changes
LightningToast Feb 27, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
27 changes: 27 additions & 0 deletions Assets/ARInput.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class ARInput : MonoBehaviour {
public LayerMask touchMask;
// Use this for initialization
void Start () {

}

// Update is called once per frame
void Update () {
if (Input.GetMouseButtonDown(0))
{
Debug.Log("Click");
RaycastHit hit;
Ray ray = Camera.main.ScreenPointToRay(Input.mousePosition);
Debug.DrawRay(ray.origin, ray.direction * 100000, Color.yellow, 0.0f, false);
if (Physics.Raycast(ray, out hit, Mathf.Infinity, touchMask))
{
Debug.Log(hit.collider.gameObject.name);
hit.transform.SendMessage("Clicked");
}
}
}
}
13 changes: 13 additions & 0 deletions Assets/ARInput.cs.meta

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

36 changes: 36 additions & 0 deletions Assets/ARRender.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class ARRender : MonoBehaviour {
public bool active = false;
bool ignore = false;
// Use this for initialization
void Start () {
if(GameObject.Find("NetworkManager").GetComponent<LocalNetwork>().VR)
{
ignore = true;
}
}

// Update is called once per frame
void Update () {
if(ignore)
{
return;
}
if (GetComponent<Collider>().bounds.Intersects(GameObject.Find("Indicator(Clone)").GetComponent<Collider>().bounds))
{
Debug.Log("Bounds intersecting");
transform.GetChild(0).GetComponent<Renderer>().enabled = true;
} else {
transform.GetChild(0).GetComponent<Renderer>().enabled = false;
}

//active = false;
}
void OnCollisionStay(Collision collision)
{

}
}
13 changes: 13 additions & 0 deletions Assets/ARRender.cs.meta

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

21 changes: 21 additions & 0 deletions Assets/BulletTrait.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class BulletTrait : MonoBehaviour {

// Use this for initialization
void Start () {
Invoke("SelfDestruct",2f);
}

// Update is called once per frame
void Update () {

}

void SelfDestruct()
{
Destroy(gameObject);
}
}
13 changes: 13 additions & 0 deletions Assets/BulletTrait.cs.meta

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

120 changes: 120 additions & 0 deletions Assets/Door.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Networking;

public class Door : NetworkBehaviour {
bool attemptOpen = false;
public Vector3 initialPos;
public Vector3 openDir;
Vector3 openPos;
public Vector3 targetPos;
public bool locked = false;
public float speed = 1.0f;
public bool forceDoor = false;
public Vector3[] hackPositions;
GameObject[] hacks;
public GameObject hack;
public bool show = false;
public bool open = false;
// Use this for initialization
void Start () {
//initialPos = transform.position;
openPos = openDir;
targetPos = initialPos;
hacks = new GameObject[hackPositions.Length];
}

// Update is called once per frame
void Update () {
if(show) {
print("target " + targetPos + " initial " + initialPos + " open " + openPos);
}
if(open) {
targetPos = openDir;
} else {
targetPos = initialPos;
}
float step = speed * Time.deltaTime;
transform.position = Vector3.MoveTowards(transform.position,targetPos, step);
if(Input.GetKeyDown("b")) {
forceDoor = !forceDoor;
CmdOpenDoor(forceDoor);
}

}
void Clicked () {
Debug.Log("Door Clicked");
if (transform.GetChild(0).GetComponent<Renderer>().enabled)
{
forceDoor = !forceDoor;
CmdOpenDoor(forceDoor);
/*if (!locked)
{
forceDoor = !forceDoor;
CmdOpenDoor(forceDoor);
}
else
{
if (!attemptOpen)
{

SpawnHack();
attemptOpen = true;
}
}*/
}
}
void Passed () {
Debug.Log("Door Unlocked!");
locked = false;
for (int x = 0; x < hacks.Length; x++) {
Destroy(hacks[x]);
}
}
void SpawnHack () {
hacks[0] = (GameObject) Instantiate(hack, hackPositions[0], transform.rotation);
hacks[0].GetComponent<Hack>().callBack = this.gameObject;
hacks[0].GetComponent<Hack>().correct = true;
for (int x = 1; x < hackPositions.Length; x++) {
hacks[x] = Instantiate(hack, hackPositions[x], transform.rotation);
}
}
[Command]
void CmdOpenDoor(bool pos) {
if (pos)
{
targetPos = openPos;

}
else
{
targetPos = initialPos;
}
RpcOpenDoor(pos);
}
[ClientRpc]
void RpcOpenDoor(bool pos) {
open = pos;
callOnLocal(pos);
Debug.Log("RPC Door" + pos);
if (pos)
{
Debug.Log("RPC Door Open Detected " + openPos);
targetPos = openPos;
Debug.Log(" RPC Door target " + targetPos);
}
else
{
Debug.Log("RPC Door Closed Detected " + initialPos);
targetPos = initialPos;
Debug.Log(" RPC Door target " + targetPos);
}
}
void callOnLocal(bool pos)
{
open = pos;
print("Call on Local " + transform.position);
print("Local Name " + this.name);
}
}
13 changes: 13 additions & 0 deletions Assets/Door.cs.meta

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

Loading