Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Intro to Scripting - Point n Click/Choose Your Own first project Buil…
…d Submission.

Check out 0_Builds..... and the web build is in there.
  • Loading branch information
smz11006 committed Sep 22, 2015
1 parent fc40705 commit d75d718
Show file tree
Hide file tree
Showing 980 changed files with 532 additions and 11 deletions.
136 changes: 136 additions & 0 deletions 0_Game_Submission_Builds/0_Game_Submission_Builds.html
@@ -0,0 +1,136 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Unity Web Player | Mouse Control</title>
<script type='text/javascript' src='https://ssl-webplayer.unity3d.com/download_webplayer-3.x/3.0/uo/jquery.min.js'></script>
<script type="text/javascript">
<!--
var unityObjectUrl = "http://webplayer.unity3d.com/download_webplayer-3.x/3.0/uo/UnityObject2.js";
if (document.location.protocol == 'https:')
unityObjectUrl = unityObjectUrl.replace("http://", "https://ssl-");
document.write('<script type="text\/javascript" src="' + unityObjectUrl + '"><\/script>');
-->
</script>
<script type="text/javascript">
<!--
var config = {
width: 960,
height: 600,
params: { enableDebugging:"0" }

};
var u = new UnityObject2(config);

jQuery(function() {

var $missingScreen = jQuery("#unityPlayer").find(".missing");
var $brokenScreen = jQuery("#unityPlayer").find(".broken");
$missingScreen.hide();
$brokenScreen.hide();

u.observeProgress(function (progress) {
switch(progress.pluginStatus) {
case "broken":
$brokenScreen.find("a").click(function (e) {
e.stopPropagation();
e.preventDefault();
u.installPlugin();
return false;
});
$brokenScreen.show();
break;
case "missing":
$missingScreen.find("a").click(function (e) {
e.stopPropagation();
e.preventDefault();
u.installPlugin();
return false;
});
$missingScreen.show();
break;
case "installed":
$missingScreen.remove();
break;
case "first":
break;
}
});
u.initPlugin(jQuery("#unityPlayer")[0], "0_Game_Submission_Builds.unity3d");
});
-->
</script>
<style type="text/css">
<!--
body {
font-family: Helvetica, Verdana, Arial, sans-serif;
background-color: white;
color: black;
text-align: center;
}
a:link, a:visited {
color: #000;
}
a:active, a:hover {
color: #666;
}
p.header {
font-size: small;
}
p.header span {
font-weight: bold;
}
p.footer {
font-size: x-small;
}
div.content {
margin: auto;
width: 960px;
}
div.broken,
div.missing {
margin: auto;
position: relative;
top: 50%;
width: 193px;
}
div.broken a,
div.missing a {
height: 63px;
position: relative;
top: -31px;
}
div.broken img,
div.missing img {
border-width: 0px;
}
div.broken {
display: none;
}
div#unityPlayer {
cursor: default;
height: 600px;
width: 960px;
}
-->
</style>
</head>
<body>
<p class="header"><span>Unity Web Player | </span>Mouse Control</p>
<div class="content">
<div id="unityPlayer">
<div class="missing">
<a href="http://unity3d.com/webplayer/" title="Unity Web Player. Install now!">
<img alt="Unity Web Player. Install now!" src="http://webplayer.unity3d.com/installation/getunity.png" width="193" height="63" />
</a>
</div>
<div class="broken">
<a href="http://unity3d.com/webplayer/" title="Unity Web Player. Install now! Restart your browser after install.">
<img alt="Unity Web Player. Install now! Restart your browser after install." src="http://webplayer.unity3d.com/installation/getunityrestart.png" width="193" height="63" />
</a>
</div>
</div>
</div>
<p class="footer">&laquo; created with <a href="http://unity3d.com/unity/" title="Go to unity3d.com">Unity</a> &raquo;</p>
</body>
</html>
Binary file not shown.
2 changes: 1 addition & 1 deletion ChooseYourOwn/ChooseYourOwn.sln
Expand Up @@ -17,7 +17,7 @@ Global
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(MonoDevelopProperties) = preSolution
GlobalSection(MonoDevelopProperties) = preSolution
StartupItem = Assembly-CSharp.csproj
Policies = $0
$0.TextStylePolicy = $1
Expand Down
Binary file modified ChooseYourOwn/Library/CurrentLayout.dwlt
Binary file not shown.
Binary file modified ChooseYourOwn/Library/assetDatabase3
Binary file not shown.
Binary file not shown.
2 changes: 1 addition & 1 deletion Mouse Control/Assembly-CSharp.csproj
Expand Up @@ -19,7 +19,7 @@
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>Temp\bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE;UNITY_5_2_0;UNITY_5_2;UNITY_5;ENABLE_NEW_BUGREPORTER;ENABLE_2D_PHYSICS;ENABLE_4_6_FEATURES;ENABLE_AUDIO;ENABLE_CACHING;ENABLE_CLOTH;ENABLE_DUCK_TYPING;ENABLE_FRAME_DEBUGGER;ENABLE_GENERICS;ENABLE_HOME_SCREEN;ENABLE_IMAGEEFFECTS;ENABLE_LIGHT_PROBES_LEGACY;ENABLE_MICROPHONE;ENABLE_MULTIPLE_DISPLAYS;ENABLE_PHYSICS;ENABLE_PLUGIN_INSPECTOR;ENABLE_SHADOWS;ENABLE_SINGLE_INSTANCE_BUILD_SETTING;ENABLE_SPRITES;ENABLE_TERRAIN;ENABLE_RAKNET;ENABLE_UNET;ENABLE_UNITYEVENTS;ENABLE_VR;ENABLE_WEBCAM;ENABLE_WWW;ENABLE_CLOUD_SERVICES;ENABLE_CLOUD_SERVICES_ADS;ENABLE_CLOUD_HUB;ENABLE_CLOUD_PROJECT_ID;ENABLE_CLOUD_SERVICES_ANALYTICS;ENABLE_CLOUD_SERVICES_UNET;ENABLE_CLOUD_SERVICES_BUILD;ENABLE_CLOUD_LICENSE;ENABLE_EDITOR_METRICS;ENABLE_REFLECTION_BUFFERS;INCLUDE_DYNAMIC_GI;INCLUDE_GI;INCLUDE_IL2CPP;INCLUDE_DIRECTX12;PLATFORM_SUPPORTS_MONO;RENDER_SOFTWARE_CURSOR;ENABLE_LOCALIZATION;ENABLE_ANDROID_ATLAS_ETC1_COMPRESSION;UNITY_STANDALONE_WIN;UNITY_STANDALONE;ENABLE_SUBSTANCE;ENABLE_TEXTUREID_MAP;ENABLE_RUNTIME_GI;ENABLE_MOVIES;ENABLE_NETWORK;ENABLE_CRUNCH_TEXTURE_COMPRESSION;ENABLE_LOG_MIXED_STACKTRACE;ENABLE_UNITYWEBREQUEST;ENABLE_EVENT_QUEUE;ENABLE_WEBSOCKET_HOST;ENABLE_MONO;ENABLE_PROFILER;UNITY_ASSERTIONS;UNITY_EDITOR;UNITY_EDITOR_64;UNITY_EDITOR_WIN</DefineConstants>
<DefineConstants>DEBUG;TRACE;UNITY_5_2_0;UNITY_5_2;UNITY_5;ENABLE_NEW_BUGREPORTER;ENABLE_2D_PHYSICS;ENABLE_4_6_FEATURES;ENABLE_AUDIO;ENABLE_CACHING;ENABLE_CLOTH;ENABLE_DUCK_TYPING;ENABLE_FRAME_DEBUGGER;ENABLE_GENERICS;ENABLE_HOME_SCREEN;ENABLE_IMAGEEFFECTS;ENABLE_LIGHT_PROBES_LEGACY;ENABLE_MICROPHONE;ENABLE_MULTIPLE_DISPLAYS;ENABLE_PHYSICS;ENABLE_PLUGIN_INSPECTOR;ENABLE_SHADOWS;ENABLE_SINGLE_INSTANCE_BUILD_SETTING;ENABLE_SPRITES;ENABLE_TERRAIN;ENABLE_RAKNET;ENABLE_UNET;ENABLE_UNITYEVENTS;ENABLE_WEBCAM;ENABLE_WWW;ENABLE_CLOUD_SERVICES;ENABLE_CLOUD_SERVICES_ADS;ENABLE_CLOUD_HUB;ENABLE_CLOUD_PROJECT_ID;ENABLE_CLOUD_SERVICES_ANALYTICS;ENABLE_CLOUD_SERVICES_UNET;ENABLE_CLOUD_SERVICES_BUILD;ENABLE_CLOUD_LICENSE;ENABLE_EDITOR_METRICS;ENABLE_REFLECTION_BUFFERS;INCLUDE_DYNAMIC_GI;INCLUDE_GI;INCLUDE_IL2CPP;INCLUDE_DIRECTX12;PLATFORM_SUPPORTS_MONO;RENDER_SOFTWARE_CURSOR;ENABLE_LOCALIZATION;ENABLE_ANDROID_ATLAS_ETC1_COMPRESSION;UNITY_WEBPLAYER;ENABLE_SUBSTANCE;WEBPLUG;ENABLE_TEXTUREID_MAP;ENABLE_RUNTIME_GI;ENABLE_MOVIES;ENABLE_NETWORK;ENABLE_CRUNCH_TEXTURE_COMPRESSION;ENABLE_MONO;ENABLE_PROFILER;UNITY_ASSERTIONS;UNITY_EDITOR;UNITY_EDITOR_64;UNITY_EDITOR_WIN</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<NoWarn>0169</NoWarn>
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Binary file not shown.

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

Binary file added Mouse Control/Assets/MetalGrates.mat
Binary file not shown.
8 changes: 8 additions & 0 deletions Mouse Control/Assets/MetalGrates.mat.meta

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

Binary file modified Mouse Control/Assets/MouseControl.unity
Binary file not shown.
172 changes: 166 additions & 6 deletions Mouse Control/Assets/MouseController.cs
Expand Up @@ -5,27 +5,187 @@ using System.Collections;
public class MouseController : MonoBehaviour
{

//Camera Variables
GameObject cameraSet;

public Camera camera0;
public Camera camera1;
public Camera camera2;
public Camera camera3;
public Camera camera4;

//Camera States
int room = 0;

//Counter Variables
public int holdKey1 = 0;
public int holdKey2 = 0;
public int openLock1 = 0;
public int openLock2 = 0;

Ray ray;
RaycastHit hit;
public GameObject prefab;


void Start()
{
camera0.enabled = true;
camera1.enabled = false;
camera2.enabled = false;
camera3.enabled = false;
camera4.enabled = false;
room = 0;
}


void Update ()
{

ray = Camera.main.ScreenPointToRay (Input.mousePosition);
//ray = Camera.main.ScreenPointToRay (Input.mousePosition);

//Clicking
if (Physics.Raycast (ray, out hit)) {
if (Input.GetKeyDown (KeyCode.Mouse0)) {
Debug.Log ("Left Mouse Down");

GameObject obj = Instantiate (prefab, new Vector3 (hit.point.x, hit.point.y, hit.point.z), Quaternion.identity) as GameObject;
}
if (hit.transform.name == "Key1")
{
Debug.Log("Left Mouse Down");
Destroy(hit.transform.gameObject);
holdKey1 = 1;
Debug.Log(holdKey1.ToString());
}
if (hit.transform.name == "Key2")
{
Debug.Log("Left Mouse Down");
Debug.Log(holdKey2.ToString());
Destroy(hit.transform.gameObject);
holdKey2 = 1;
Debug.Log(holdKey2.ToString());
}
if (hit.transform.name == "Lock1")
{
if (holdKey1 == 1)
{
Destroy(hit.transform.gameObject);
openLock1 = 1;
}
}
if (hit.transform.name == "Lock2")
{
if (holdKey2 == 1)
{
Destroy(hit.transform.gameObject);
openLock2 = 1;
}
}
//GameObject obj = Instantiate (prefab, new Vector3 (hit.point.x, hit.point.y, hit.point.z), Quaternion.identity) as GameObject;
}
if (Input.GetKeyDown (KeyCode.Mouse1)) {
Debug.Log ("Righ Mouse Down");
Destroy(hit.transform.gameObject);
}
}
}

//Moving

//Room 0, Entrance
if (room == 0)
{
camera1.enabled = false;
camera2.enabled = false;
camera3.enabled = false;
camera4.enabled = false;
camera0.enabled = true;

ray = camera0.ScreenPointToRay(Input.mousePosition);



if (Input.GetKeyDown(KeyCode.W))
{
room = 1;
}

}


//Room 1, Middle
if (room == 1)
{
camera0.enabled = false;
camera2.enabled = false;
camera3.enabled = false;
camera4.enabled = false;
camera1.enabled = true;
ray = camera1.ScreenPointToRay(Input.mousePosition);


//Check the Lock

if (Input.GetKeyDown(KeyCode.A))
{
room = 3;
}
if (Input.GetKeyDown(KeyCode.D))
{
room = 4;
}
if (Input.GetKeyDown(KeyCode.S))
{
room = 0;
}
if (Input.GetKeyDown(KeyCode.W))
{
if (openLock1 + openLock2 == 2)
room = 2;
}
}

//Room 2, End
if (room == 2)
{
camera0.enabled = false;
camera1.enabled = false;
camera3.enabled = false;
camera4.enabled = false;
camera2.enabled = true;
ray = camera2.ScreenPointToRay(Input.mousePosition);

}

//Room 3, Left
if (room == 3)
{
camera0.enabled = false;
camera2.enabled = false;
camera1.enabled = false;
camera4.enabled = false;
camera3.enabled = true;
ray = camera3.ScreenPointToRay(Input.mousePosition);

if (Input.GetKeyDown(KeyCode.D))
{
room = 1;
}

}

//Room 4, Right
if (room == 4)
{
camera0.enabled = false;
camera2.enabled = false;
camera1.enabled = false;
camera3.enabled = false;
camera4.enabled = true;
ray = camera4.ScreenPointToRay(Input.mousePosition);
if (Input.GetKeyDown(KeyCode.A))
{
room = 1;
}

}


}
}
Binary file added Mouse Control/Assets/WallChrome.mat
Binary file not shown.
8 changes: 8 additions & 0 deletions Mouse Control/Assets/WallChrome.mat.meta

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

Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit d75d718

Please sign in to comment.