Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Click Adventure
Click adventure game and organized repository
  • Loading branch information
apw14002 committed Nov 3, 2016
1 parent 978a5e9 commit 64995e7
Show file tree
Hide file tree
Showing 1,043 changed files with 70,188 additions and 5 deletions.
Binary file modified .DS_Store
Binary file not shown.
Binary file added ClickAdventureGame_Wolf.zip
Binary file not shown.
Binary file added ClickAdventureGame_Wolf/.DS_Store
Binary file not shown.
@@ -0,0 +1,34 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleExecutable</key>
<string>Untitled</string>
<key>CFBundleGetInfoString</key>
<string>Unity Player version 5.4.0f3 (a6d8d714de6f). (c) 2016 Unity Technologies ApS. All rights reserved.</string>
<key>CFBundleIconFile</key>
<string>PlayerIcon.icns</string>
<key>CFBundleIdentifier</key>
<string>unity.DefaultCompany.ClickAdventureGame</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>ClickAdventureGame</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>Unity Player version 5.4.0f3</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>5.4.0f3</string>
<key>NSMainNibFile</key>
<string>MainMenu</string>
<key>NSPrincipalClass</key>
<string>PlayerApplication</string>
<key>UnityBuildNumber</key>
<string>a6d8d714de6f</string>
</dict>
</plist>
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
12 changes: 12 additions & 0 deletions ClickAdventureGame_Wolf/PCbuild_ClickAdventureGame.rtf
@@ -0,0 +1,12 @@
{\rtf1\ansi\ansicpg1252\cocoartf1348\cocoasubrtf170
{\fonttbl\f0\fswiss\fcharset0 Helvetica;}
{\colortbl;\red255\green255\blue255;}
\margl1440\margr1440\vieww10800\viewh8400\viewkind0
\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural

\f0\fs24 \cf0 Click Adventure Game\
\
Find the four colors cubes\
Solve the 3 puzzle switch to open door (Answer: 1 & 3)\
Place cube on right color cylinder by clicking\
}
120 changes: 120 additions & 0 deletions ClickAdventureGame_Wolf/Scripts/Raycast.cs
@@ -0,0 +1,120 @@
using UnityEngine;
using System.Collections;
using UnityEngine.UI;

public class Raycast : MonoBehaviour {

public GameObject cube1;
public GameObject cubeGreen;
public GameObject cubeYellow;
public GameObject cubePurple;

public GameObject xText;
public GameObject greenText;
public GameObject yellowText;
public GameObject purpleText;

public GameObject cylR;
public GameObject cylG;
public GameObject cylY;
public GameObject cylP;

public GameObject boxR;
public GameObject boxG;
public GameObject boxY;
public GameObject boxP;

public bool haveRed = false;
public bool haveGreen = false;
public bool haveYellow = false;
public bool havePurple = false;

public int BoxIndex = 0;

public int WinIndex = 0;
public Text win;

// Use this for initialization
void Start () {
boxR.active = false;
boxG.active = false;
boxY.active = false;
boxP.active = false;

win.enabled = false;
}

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

if (WinIndex == 4) {
win.enabled = true;
}

if (Input.GetMouseButtonDown (0)) {
Ray ray = Camera.main.ScreenPointToRay (Input.mousePosition);

RaycastHit hit;

if (Physics.Raycast (ray, out hit)) {
if (hit.collider.gameObject == cube1) {
xText.GetComponent<Text> ().color = Color.red;
cube1.active = false;
haveRed = true;

}
else if (hit.collider.gameObject == cubeGreen) {
greenText.GetComponent<Text> ().color = Color.green;
cubeGreen.active = false;
BoxIndex++;
haveGreen = true;


}
else if (hit.collider.gameObject == cubeYellow) {
yellowText.GetComponent<Text> ().color = Color.yellow;
cubeYellow.active = false;
haveYellow = true;

}
else if (hit.collider.gameObject == cubePurple) {
purpleText.GetComponent<Text> ().color = Color.magenta;
cubePurple.active = false;
havePurple = true;

}
else if (hit.collider.gameObject == cylP) {
if (havePurple == true) {
purpleText.GetComponent<Text> ().color = new Color(227f,227f,227f);
boxP.active = true;
WinIndex++;
}

}
else if (hit.collider.gameObject == cylR) {
if (haveRed == true) {
xText.GetComponent<Text> ().color = new Color (227f, 227f, 227f);
boxR.active = true;
WinIndex++;
}

}
else if (hit.collider.gameObject == cylY) {
if (haveYellow == true) {
yellowText.GetComponent<Text> ().color = new Color (227f, 227f, 227f);
boxY.active = true;
WinIndex++;
}
}
else if (hit.collider.gameObject == cylG) {
if (haveGreen == true) {
greenText.GetComponent<Text> ().color = new Color (227f, 227f, 227f);
boxG.active = true;
WinIndex++;
}

}
}
}
}
}
12 changes: 12 additions & 0 deletions ClickAdventureGame_Wolf/Scripts/Raycast.cs.meta

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

0 comments on commit 64995e7

Please sign in to comment.