Skip to content

Commit cf0023c

Browse files
committed
Remade Original Demo
Remade demo to follow the instructions listed in the Readme.
1 parent c1dfffa commit cf0023c

File tree

1,005 files changed

+93262
-186
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,005 files changed

+93262
-186
lines changed
5 KB
Binary file not shown.

CollectThemAll/Assets/Cardboard.meta CardboardDemo/Assets/Cardboard.meta

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
File renamed without changes.

CollectThemAll/Assets/Cardboard/Legacy.meta CardboardDemo/Assets/Cardboard/Legacy.meta

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
File renamed without changes.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,158 @@
1+
%YAML 1.1
2+
%TAG !u! tag:unity3d.com,2011:
3+
--- !u!21 &2100000
4+
Material:
5+
serializedVersion: 6
6+
m_ObjectHideFlags: 0
7+
m_PrefabParentObject: {fileID: 0}
8+
m_PrefabInternal: {fileID: 0}
9+
m_Name: CardboardReticleMaterial
10+
m_Shader: {fileID: 4800000, guid: a3b352fc2ba734605a3df75466e600f0, type: 3}
11+
m_ShaderKeywords:
12+
m_LightmapFlags: 5
13+
m_CustomRenderQueue: -1
14+
stringTagMap: {}
15+
m_SavedProperties:
16+
serializedVersion: 2
17+
m_TexEnvs:
18+
data:
19+
first:
20+
name: _MainTex
21+
second:
22+
m_Texture: {fileID: 0}
23+
m_Scale: {x: 1, y: 1}
24+
m_Offset: {x: 0, y: 0}
25+
data:
26+
first:
27+
name: _BumpMap
28+
second:
29+
m_Texture: {fileID: 0}
30+
m_Scale: {x: 1, y: 1}
31+
m_Offset: {x: 0, y: 0}
32+
data:
33+
first:
34+
name: _DetailNormalMap
35+
second:
36+
m_Texture: {fileID: 0}
37+
m_Scale: {x: 1, y: 1}
38+
m_Offset: {x: 0, y: 0}
39+
data:
40+
first:
41+
name: _ParallaxMap
42+
second:
43+
m_Texture: {fileID: 0}
44+
m_Scale: {x: 1, y: 1}
45+
m_Offset: {x: 0, y: 0}
46+
data:
47+
first:
48+
name: _OcclusionMap
49+
second:
50+
m_Texture: {fileID: 0}
51+
m_Scale: {x: 1, y: 1}
52+
m_Offset: {x: 0, y: 0}
53+
data:
54+
first:
55+
name: _EmissionMap
56+
second:
57+
m_Texture: {fileID: 0}
58+
m_Scale: {x: 1, y: 1}
59+
m_Offset: {x: 0, y: 0}
60+
data:
61+
first:
62+
name: _DetailMask
63+
second:
64+
m_Texture: {fileID: 0}
65+
m_Scale: {x: 1, y: 1}
66+
m_Offset: {x: 0, y: 0}
67+
data:
68+
first:
69+
name: _DetailAlbedoMap
70+
second:
71+
m_Texture: {fileID: 0}
72+
m_Scale: {x: 1, y: 1}
73+
m_Offset: {x: 0, y: 0}
74+
data:
75+
first:
76+
name: _MetallicGlossMap
77+
second:
78+
m_Texture: {fileID: 0}
79+
m_Scale: {x: 1, y: 1}
80+
m_Offset: {x: 0, y: 0}
81+
m_Floats:
82+
data:
83+
first:
84+
name: _SrcBlend
85+
second: 1
86+
data:
87+
first:
88+
name: _DstBlend
89+
second: 0
90+
data:
91+
first:
92+
name: _Radius
93+
second: 0
94+
data:
95+
first:
96+
name: _Cutoff
97+
second: .5
98+
data:
99+
first:
100+
name: _Parallax
101+
second: .0199999996
102+
data:
103+
first:
104+
name: _ZWrite
105+
second: 1
106+
data:
107+
first:
108+
name: _Glossiness
109+
second: .5
110+
data:
111+
first:
112+
name: _BumpScale
113+
second: 1
114+
data:
115+
first:
116+
name: _OcclusionStrength
117+
second: 1
118+
data:
119+
first:
120+
name: _DetailNormalMapScale
121+
second: 1
122+
data:
123+
first:
124+
name: _UVSec
125+
second: 0
126+
data:
127+
first:
128+
name: _Mode
129+
second: 0
130+
data:
131+
first:
132+
name: _Metallic
133+
second: 0
134+
data:
135+
first:
136+
name: _InnerDiameter
137+
second: 1.5
138+
data:
139+
first:
140+
name: _OuterDiameter
141+
second: 2
142+
data:
143+
first:
144+
name: _DistanceInMeters
145+
second: 2
146+
data:
147+
first:
148+
name: _Border
149+
second: .0149999997
150+
m_Colors:
151+
data:
152+
first:
153+
name: _EmissionColor
154+
second: {r: 0, g: 0, b: 0, a: 1}
155+
data:
156+
first:
157+
name: _Color
158+
second: {r: 1, g: 1, b: 1, a: 1}

CardboardDemo/Assets/Our Assets.meta

+9
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

CollectThemAll/Assets/Materials.meta CardboardDemo/Assets/Our Assets/Materials.meta

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

CollectThemAll/Assets/Materials/BallMaterial.mat.meta CardboardDemo/Assets/Our Assets/Materials/CollectibleMaterial.mat.meta

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Binary file not shown.

CollectThemAll/Assets/Materials/GroundMaterial.mat.meta CardboardDemo/Assets/Our Assets/Materials/GroundMaterial.mat.meta

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

CollectThemAll/Assets/Prefabs.meta CardboardDemo/Assets/Our Assets/Prefabs.meta

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

CollectThemAll/Assets/Prefabs/Collectible.prefab.meta CardboardDemo/Assets/Our Assets/Prefabs/Collectible.prefab.meta

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

CollectThemAll/Assets/Scenes.meta CardboardDemo/Assets/Our Assets/Scenes.meta

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Binary file not shown.

CollectThemAll/Assets/Scenes/PlayingField.unity.meta CardboardDemo/Assets/Our Assets/Scenes/Field.unity.meta

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

CollectThemAll/Assets/Scripts.meta CardboardDemo/Assets/Our Assets/Scripts.meta

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

CollectThemAll/Assets/Scripts/Collect.cs CardboardDemo/Assets/Our Assets/Scripts/Collect.cs

+9-9
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,14 @@
44

55
[RequireComponent(typeof(Collider))]
66

7-
public class Collect : MonoBehaviour {
7+
public class Collect : MonoBehaviour
8+
{
89

9-
10-
private Vector3 startingPosition;
10+
//Create game controller
1111
private GameController gameController;
1212

13-
13+
/*Our Start() function finds the instance of our GameController and by default sets our
14+
collectable so that we're not looking at it*/
1415
void Start()
1516
{
1617
GameObject gameControllerObject = GameObject.FindWithTag("GameController");
@@ -22,10 +23,10 @@ void Start()
2223
{
2324
Debug.Log("Cannot find 'GameController' script");
2425
}
25-
startingPosition = transform.localPosition;
2626
SetGazedAt(false);
2727
}
2828

29+
/*LateUpdate() will close the app if user presses back button on both Android and iOS*/
2930
void LateUpdate()
3031
{
3132
Cardboard.SDK.UpdateState();
@@ -35,21 +36,20 @@ void LateUpdate()
3536
}
3637
}
3738

39+
/*SetGazedAt() changes the color of the collectable based on whether or not we're looking at it.
40+
Red for not, green for yes.*/
3841
public void SetGazedAt(bool gazedAt)
3942
{
4043
GetComponent<Renderer>().material.color = gazedAt ? Color.green : Color.red;
4144
}
4245

46+
/*Collected() increments our score value held by our GameController and deactivates the collectable*/
4347
public void Collected()
4448
{
4549
gameController.AddOne();
4650
gameObject.SetActive(false);
4751
}
4852

49-
public void ToggleVRMode()
50-
{
51-
Cardboard.SDK.VRModeEnabled = !Cardboard.SDK.VRModeEnabled;
52-
}
5353
}
5454

5555

CollectThemAll/Assets/Scripts/Collect.cs.meta CardboardDemo/Assets/Our Assets/Scripts/Collect.cs.meta

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

CollectThemAll/Assets/Scripts/GameController.cs CardboardDemo/Assets/Our Assets/Scripts/GameController.cs

+8-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,10 @@
22
using UnityEngine.UI;
33
using System.Collections;
44

5-
public class GameController : MonoBehaviour {
5+
public class GameController : MonoBehaviour
6+
{
7+
8+
//Global Variables
69
public Text countText;
710
public Text winText;
811

@@ -23,18 +26,22 @@ void Update()
2326

2427
}
2528

29+
//AddOne() increments the score count and updates the GUI Text
2630
public void AddOne()
2731
{
2832
count++;
2933
SetCountText();
3034
}
3135

36+
//SetCountText() updates the count to the screen and displays
37+
//"You Win" to the screen when collectables all collected
3238
void SetCountText()
3339
{
3440
countText.text = "Count: " + count.ToString();
3541
if (count >= 12)
3642
{
3743
winText.text = "You Win!";
44+
3845
}
3946
}
4047
}

CollectThemAll/Assets/Scripts/GameController.cs.meta CardboardDemo/Assets/Our Assets/Scripts/GameController.cs.meta

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
using UnityEngine;
2+
using System.Collections;
3+
4+
public class ItemRotator : MonoBehaviour
5+
{
6+
7+
// Use this for initialization
8+
void Start()
9+
{
10+
11+
}
12+
13+
// Update is called once per frame
14+
//Rotates the collectables
15+
void Update()
16+
{
17+
transform.Rotate(new Vector3(15, 30, 45) * Time.deltaTime);
18+
}
19+
}

0 commit comments

Comments
 (0)