Skip to content

Commit

Permalink
Added App
Browse files Browse the repository at this point in the history
This is the first version of Wall Destroyer that GitHub has ever seen!
  • Loading branch information
Fried-man committed Jan 17, 2018
1 parent d084525 commit f9509a8
Show file tree
Hide file tree
Showing 58 changed files with 532 additions and 0 deletions.
Binary file added Assets/1441761834718.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
56 changes: 56 additions & 0 deletions Assets/1441761834718.jpg.meta

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

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

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

Binary file added Assets/Block (1).prefab
Binary file not shown.
8 changes: 8 additions & 0 deletions Assets/Block (1).prefab.meta

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

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

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

Binary file added Assets/Block.prefab
Binary file not shown.
8 changes: 8 additions & 0 deletions Assets/Block.prefab.meta

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

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

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

Binary file added Assets/Icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
56 changes: 56 additions & 0 deletions Assets/Icon.png.meta

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

9 changes: 9 additions & 0 deletions Assets/Materials.meta

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

Binary file added Assets/Materials/desert_tiled.mat
Binary file not shown.
8 changes: 8 additions & 0 deletions Assets/Materials/desert_tiled.mat.meta

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

Binary file added Assets/Materials/frontend-large.mat
Binary file not shown.
8 changes: 8 additions & 0 deletions Assets/Materials/frontend-large.mat.meta

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

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

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

9 changes: 9 additions & 0 deletions Assets/Scenes.meta

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

Binary file added Assets/Scenes/Game.unity
Binary file not shown.
8 changes: 8 additions & 0 deletions Assets/Scenes/Game.unity.meta

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

Binary file added Assets/Scenes/MainMenu.unity
Binary file not shown.
8 changes: 8 additions & 0 deletions Assets/Scenes/MainMenu.unity.meta

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

9 changes: 9 additions & 0 deletions Assets/Script.meta

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

41 changes: 41 additions & 0 deletions Assets/Script/Block.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
#pragma strict
var maxFallDistance = -5;
var Left = 12;

function Start () {
var times = 20;
while (times > -1 && PlayerPrefs.GetInt("GameOver") == 1) {
yield WaitForSeconds (1);
times--;
if (times == 0) {
Destroy (gameObject);
}
}
}

function Update () {
if (Input.GetMouseButtonDown(0)) {
var hit: RaycastHit;
var ray = Camera.main.ScreenPointToRay(Input.mousePosition);
if(Physics.Raycast(ray, hit)){
if (hit.transform.name == this.name && PlayerPrefs.GetInt("GameOver") != 1) {
PlayerPrefs.SetInt("Score", PlayerPrefs.GetInt("Score") + 1);
PlayerPrefs.SetInt("Block Total", PlayerPrefs.GetInt("Block Total") - 1);
PlayerPrefs.SetInt(this.name, 0);
Destroy (gameObject); //Nothing after
}

}
}

if (transform.position.y <= maxFallDistance && Application.loadedLevelName == "MainMenu") {
Destroy (gameObject);
}
}

function OnCollisionEnter(col : Collision) {
if (col.collider.name == "Limit" && PlayerPrefs.GetInt("GameOver") != 1) {
PlayerPrefs.SetInt("GameOver", 1);
Debug.Log("END");
}
}
12 changes: 12 additions & 0 deletions Assets/Script/Block.js.meta

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

62 changes: 62 additions & 0 deletions Assets/Script/Tower.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
#pragma strict
import System.Collections.Generic;

var original : GameObject;
//var MiniMenu : GameObject;
var MaxBlocks : int;
var BB88 : int;
var Blockorz : GameObject;
var EndMenu : GameObject;
var imports = new List.<int>();
var Score : UnityEngine.UI.Text;
var HighScore : UnityEngine.UI.Text;
var Level : int;

function Start () {
PlayerPrefs.SetInt("Score", 0);
PlayerPrefs.SetInt("Block Total", 0);
PlayerPrefs.SetInt("GameOver", 0);
MaxBlocks = 4;
while (1 > 0) {
Level = Random.Range(1,8);
while (Level > 0) { //CREATING THE BLOCKS
var Rando = Random.Range(-3,4);
while(imports.Contains(Rando)) {
Rando = Random.Range(-3,4);
}
Blockorz = Instantiate(original, new Vector3 (Rando, 12, 0), Quaternion.identity);
PlayerPrefs.SetInt("Block Total", PlayerPrefs.GetInt("Block Total") + 1);
BB88++;
Blockorz.name = "Block #" + BB88;
imports.Add (Rando);
Level--;
}
imports.Clear();
yield WaitForSeconds (1);
}
}

function Update () {
Score.text = "Score: " + PlayerPrefs.GetInt("Score");
HighScore.text = "HighScore: " + PlayerPrefs.GetInt("Best");

if (PlayerPrefs.GetInt("Best") <= PlayerPrefs.GetInt("Score")) {
PlayerPrefs.SetInt("Best", PlayerPrefs.GetInt("Score"));
}

if (PlayerPrefs.GetInt("GameOver") == 1) { //ENDING IT ALL
EndMenu.SetActive(true);
}
}

function Restart () {
Application.LoadLevel ("Game");
}

function Escape () {
Application.LoadLevel ("MainMenu");
}

function Suicide () {
Application.Quit();
}
12 changes: 12 additions & 0 deletions Assets/Script/Tower.js.meta

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

Binary file added Assets/TrippyBlock.prefab
Binary file not shown.
8 changes: 8 additions & 0 deletions Assets/TrippyBlock.prefab.meta

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

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

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

Binary file added Assets/b7a563b59a00d847f8025209cba0721d.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit f9509a8

Please sign in to comment.