Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Intro Scripting - Breakout Most of It
  • Loading branch information
smz11006 committed Oct 8, 2015
1 parent a7f1394 commit 9ea7fe1
Show file tree
Hide file tree
Showing 137 changed files with 306 additions and 37 deletions.
14 changes: 11 additions & 3 deletions Week5 Class Proj/Assembly-CSharp.csproj
Expand Up @@ -5,10 +5,10 @@
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>10.0.20506</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<RootNamespace></RootNamespace>
<ProjectGuid>{C552D0CB-1F18-FBF9-B8AB-C0FCA191F95B}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace></RootNamespace>
<AssemblyName>Assembly-CSharp</AssemblyName>
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
Expand All @@ -19,7 +19,7 @@
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>Temp\bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE;UNITY_5_1_3;UNITY_5_1;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_PHYSICS_PHYSX3;ENABLE_PLUGIN_INSPECTOR;ENABLE_SHADOWS;ENABLE_SINGLE_INSTANCE_BUILD_SETTING;ENABLE_SPRITES;ENABLE_TERRAIN;ENABLE_UNET;ENABLE_UNITYEVENTS;ENABLE_VR;ENABLE_WEBCAM;ENABLE_WWW;ENABLE_CLOUD_SERVICES;ENABLE_CLOUD_SERVICES_ANALYTICS;ENABLE_CLOUD_SERVICES_UNET;ENABLE_CLOUD_LICENSE;ENABLE_AUDIOMIXER_SUSPEND;ENABLE_EDITOR_METRICS;INCLUDE_DYNAMIC_GI;INCLUDE_GI;INCLUDE_IL2CPP;INCLUDE_DIRECTX12;PLATFORM_SUPPORTS_MONO;RENDER_SOFTWARE_CURSOR;ENABLE_LOCALIZATION;UNITY_STANDALONE_WIN;UNITY_STANDALONE;ENABLE_SUBSTANCE;ENABLE_TEXTUREID_MAP;ENABLE_RUNTIME_GI;ENABLE_MOVIES;ENABLE_NETWORK;ENABLE_CRUNCH_TEXTURE_COMPRESSION;ENABLE_WEBSOCKET_HOST;ENABLE_MONO;ENABLE_PROFILER;DEBUG;TRACE;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_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>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<NoWarn>0169</NoWarn>
Expand All @@ -28,7 +28,6 @@
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>Temp\bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<NoWarn>0169</NoWarn>
Expand All @@ -48,8 +47,14 @@
<ItemGroup>
<Compile Include="Assets\Scripts\Ball.cs" />
<Compile Include="Assets\Scripts\Brick.cs" />
<Compile Include="Assets\Scripts\Brick2.cs" />
<Compile Include="Assets\Scripts\MainMenu.cs" />
<Compile Include="Assets\Scripts\Paddle.cs" />
<Compile Include="Assets\Scripts\Score.cs" />
<Compile Include="Assets\Scripts\Sounds.cs" />
<Reference Include="UnityEngine.Advertisements">
<HintPath>C:/Program Files/Unity/Editor/Data/UnityExtensions/Unity/Advertisements/UnityEngine.Advertisements.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.UI">
<HintPath>C:/Program Files/Unity/Editor/Data/UnityExtensions/Unity/GUISystem/UnityEngine.UI.dll</HintPath>
</Reference>
Expand All @@ -59,6 +64,9 @@
<Reference Include="UnityEngine.Analytics">
<HintPath>C:/Program Files/Unity/Editor/Data/UnityExtensions/Unity/UnityAnalytics/UnityEngine.Analytics.dll</HintPath>
</Reference>
<Reference Include="Mono.Cecil">
<HintPath>C:/Program Files/Unity/Editor/Data/Managed/Mono.Cecil.dll</HintPath>
</Reference>
<Reference Include="UnityEditor.iOS.Extensions.Xcode">
<HintPath>C:/Program Files/Unity/Editor/Data/PlaybackEngines/iOSSupport/UnityEditor.iOS.Extensions.Xcode.dll</HintPath>
</Reference>
Expand Down
Binary file added Week5 Class Proj/Assets/Materials/Brown.mat
Binary file not shown.
8 changes: 8 additions & 0 deletions Week5 Class Proj/Assets/Materials/Brown.mat.meta

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

Binary file modified Week5 Class Proj/Assets/Scenes/Breakout.unity
Binary file not shown.
Binary file added Week5 Class Proj/Assets/Scenes/Breakout2.unity
Binary file not shown.
8 changes: 8 additions & 0 deletions Week5 Class Proj/Assets/Scenes/Breakout2.unity.meta

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

Binary file not shown.
8 changes: 8 additions & 0 deletions Week5 Class Proj/Assets/Scenes/Breakout_Loss.unity.meta

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

Binary file not shown.
8 changes: 8 additions & 0 deletions Week5 Class Proj/Assets/Scenes/Breakout_MainMenu.unity.meta

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

Binary file added Week5 Class Proj/Assets/Scenes/Breakout_Win.unity
Binary file not shown.
8 changes: 8 additions & 0 deletions Week5 Class Proj/Assets/Scenes/Breakout_Win.unity.meta

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

Binary file not shown.
8 changes: 8 additions & 0 deletions Week5 Class Proj/Assets/Scripts/Audio Source.prefab.meta

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

7 changes: 7 additions & 0 deletions Week5 Class Proj/Assets/Scripts/Ball.cs
Expand Up @@ -26,4 +26,11 @@ public class Ball : MonoBehaviour {
}

}
void Update()
{
if (gameObject.transform.position.y < -8)
{
Application.LoadLevel(4);
}
}
}
70 changes: 42 additions & 28 deletions Week5 Class Proj/Assets/Scripts/Brick.cs
@@ -1,31 +1,45 @@
using UnityEngine;
using System.Collections;

public class Brick : MonoBehaviour {

public GameObject GameMaster;

public Score scoreScript;

void Start()
{

Score scoreScript = GameMaster.GetComponent<Score> ();

}

void OnCollisionEnter (Collision other){
//Score scoreScript = GameMaster.GetComponent<Score> ();
//scoreScript.PlayerScore++;
//Debug.Log (scoreScript.PlayerScore);



Destroy (gameObject);
//score.PlayerScore++;
}




using UnityEngine.UI;

public class Brick : MonoBehaviour
{

public GameObject GameMaster;

public Score scoreScript;

Text score;

public static int scoreValue;

public AudioClip beep;
public AudioSource source;

void Awake()
{
score = GetComponent<Text>();
scoreValue = 0;
source = GetComponent<AudioSource>();
}
void OnCollisionEnter(Collision other)
{
Destroy(gameObject);
scoreValue = scoreValue + 1;
}
void Update()
{
score.text = "Score: " + scoreValue;
if (scoreValue == 8)
{
Application.LoadLevel(2);
}
switch(scoreValue)
{
case 1:
source.PlayOneShot(beep, 1f);
break;
}

}
}
9 changes: 7 additions & 2 deletions Week5 Class Proj/Assets/Scripts/Brick.cs.meta

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

35 changes: 35 additions & 0 deletions Week5 Class Proj/Assets/Scripts/Brick2.cs
@@ -0,0 +1,35 @@
using UnityEngine;
using System.Collections;
using UnityEngine.UI;

public class Brick2 : MonoBehaviour {
public GameObject GameMaster;

public Score scoreScript;

Text score;

public static int scoreValue;

void Awake()
{
score = GetComponent<Text>();
scoreValue = 0;
}
void OnCollisionEnter(Collision other)
{
Destroy(gameObject);
scoreValue = scoreValue + 1;
}
void Update()
{
score.text = "Score: " + scoreValue;
if (scoreValue == 20)
{
Application.LoadLevel(3);
}
}



}
12 changes: 12 additions & 0 deletions Week5 Class Proj/Assets/Scripts/Brick2.cs.meta

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

28 changes: 28 additions & 0 deletions Week5 Class Proj/Assets/Scripts/MainMenu.cs
@@ -0,0 +1,28 @@
using UnityEngine;
using System.Collections;

public class MainMenu : MonoBehaviour
{

// Use this for initialization
void Start()
{

}

// Update is called once per frame
void Update()
{
}
public void onClick()
{
Application.LoadLevel(0);

}
public void startGame()
{
Application.LoadLevel(1);
}

}

12 changes: 12 additions & 0 deletions Week5 Class Proj/Assets/Scripts/MainMenu.cs.meta

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

13 changes: 13 additions & 0 deletions Week5 Class Proj/Assets/Scripts/Sounds.cs
@@ -0,0 +1,13 @@
using UnityEngine;
using System.Collections;

public class Sounds : MonoBehaviour {

public AudioClip beep;
public AudioClip crash;
public AudioSource source;
// Update is called once per frame
void Update () {
source = GetComponent<AudioSource>();
}
}
12 changes: 12 additions & 0 deletions Week5 Class Proj/Assets/Scripts/Sounds.cs.meta

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

9 changes: 9 additions & 0 deletions Week5 Class Proj/Assets/Sounds.meta

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

Binary file not shown.

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

Binary file not shown.
22 changes: 22 additions & 0 deletions Week5 Class Proj/Assets/Sounds/240213__jack__metallic-hit.wav.meta

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

Binary file modified Week5 Class Proj/Library/AssetServerCacheV3
Binary file not shown.
Binary file modified Week5 Class Proj/Library/CurrentLayout.dwlt
Binary file not shown.
Binary file modified Week5 Class Proj/Library/InspectorExpandedItems.asset
Binary file not shown.
Binary file modified Week5 Class Proj/Library/ProjectSettings.asset
Binary file not shown.
Binary file not shown.
@@ -1,2 +1,2 @@
0000.55d3536a.0000
0000.55d3538a.0000
0000.55e0ab26.0000
0000.55e0ab44.0000
Binary file modified Week5 Class Proj/Library/ScriptMapper
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified Week5 Class Proj/Library/assetDatabase3
Binary file not shown.
Binary file modified Week5 Class Proj/Library/expandedItems
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified Week5 Class Proj/ProjectSettings/EditorBuildSettings.asset
Binary file not shown.
Binary file modified Week5 Class Proj/ProjectSettings/ProjectSettings.asset
Binary file not shown.
2 changes: 1 addition & 1 deletion Week5 Class Proj/ProjectSettings/ProjectVersion.txt
@@ -1,2 +1,2 @@
m_EditorVersion: 5.1.3f1
m_EditorVersion: 5.2.0f3
m_StandardAssetsVersion: 0
Binary file not shown.
Binary file not shown.

0 comments on commit 9ea7fe1

Please sign in to comment.