Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Jesus, how late is it?
  • Loading branch information
smz11006 committed Oct 6, 2015
1 parent 4d2b55d commit ef75701
Show file tree
Hide file tree
Showing 36 changed files with 200 additions and 17 deletions.
6 changes: 0 additions & 6 deletions Test_CYOA/Assembly-CSharp.csproj
Expand Up @@ -51,18 +51,12 @@
<Compile Include="Assets\Scripts\LeftyRighty.cs" />
<Compile Include="Assets\Scripts\Puzzle_231.cs" />
<Compile Include="Assets\Scripts\WorldUpdates.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>
<Reference Include="UnityEngine.Networking">
<HintPath>C:/Program Files/Unity/Editor/Data/UnityExtensions/Unity/Networking/UnityEngine.Networking.dll</HintPath>
</Reference>
<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>
Expand Down
Binary file modified Test_CYOA/Assets/CYO_Layout.unity
Binary file not shown.
Binary file added Test_CYOA/Assets/Materials/CYO_XP.jpg
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 Test_CYOA/Assets/Materials/CYO_XP.jpg.meta

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

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

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

88 changes: 87 additions & 1 deletion Test_CYOA/Assets/Scripts/Combat.cs
Expand Up @@ -26,6 +26,11 @@ public class Combat : MonoBehaviour {
public int enemy1HP = 75;
public int enemy2HP = 100;

//Collectables
public GameObject healthPickup;
public GameObject xpCube;
public GameObject gunPickup;




Expand All @@ -41,11 +46,92 @@ public class Combat : MonoBehaviour {
void Update()
{
ray = Camera.main.ScreenPointToRay(Input.mousePosition);


//Combat
if (Physics.Raycast(ray, out hit))
{
if (Input.GetKeyDown(KeyCode.Mouse0))
{
if (hit.transform.name == "Enemy1")
{
hpValue = hpValue - damageEnemy;
enemy1HP = enemy1HP - damage;
Debug.Log("attack registered");
}

}
}
if(enemy1HP <= 0)
{
Destroy(enemy1);

}
if (Physics.Raycast(ray, out hit))
{
if (Input.GetKeyDown(KeyCode.Mouse0))
{
if (hit.transform.name == "Enemy2")
{
hpValue = hpValue - damageEnemy;
enemy2HP = enemy2HP - damage;
Debug.Log("attack registered");
}

}
}
if (enemy2HP <= 0)
{
Destroy(enemy2);

}
//Level Up
if (Physics.Raycast(ray, out hit))
{
if (Input.GetKeyDown(KeyCode.Mouse0))
{
if (hit.transform.name == "XPCube")
{
Destroy(xpCube);
xp = 1; }

}
}

if(xp > 0)
{
damageEnemy = 12;
}



//HP Pickup
if (Physics.Raycast(ray, out hit))
{
if (Input.GetKeyDown(KeyCode.Mouse0))
{
if (hit.transform.name == "HealthKit")
{
Destroy(healthPickup);
hpValue = hpValue + 30;
}

}
}

//Mega Gun

if (Physics.Raycast(ray, out hit))
{
if (Input.GetKeyDown(KeyCode.Mouse0))
{
if (hit.transform.name == "MegaGun")
{
Destroy(gunPickup);
damage = 100;
}

}
}
//HP Display
hpText.text = "health: " + hpValue;

Expand Down
6 changes: 4 additions & 2 deletions Test_CYOA/Assets/Scripts/Combat.cs.meta

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

2 changes: 0 additions & 2 deletions Test_CYOA/Assets/Scripts/LeftyRighty.cs
Expand Up @@ -24,14 +24,12 @@ public class LeftyRighty : MonoBehaviour {
STFU = true;
yAngle = yAngle + 30;
gameObject.transform.localEulerAngles = new Vector3(0, yAngle, 0);
Debug.Log ("right");
}
if (Input.GetKeyDown(KeyCode.LeftArrow))
{
STFU = true;
yAngle = yAngle - 30;
gameObject.transform.localEulerAngles = new Vector3(0, yAngle , 0);
Debug.Log("left");
}
}

Expand Down
1 change: 0 additions & 1 deletion Test_CYOA/Assets/Scripts/Puzzle_231.cs
Expand Up @@ -109,7 +109,6 @@ public class Puzzle_231 : MonoBehaviour {

if (total == 3)
{
Debug.Log("Puzzle Complete!");
Destroy(button1);
Destroy(button2);
Destroy(button3);
Expand Down
23 changes: 19 additions & 4 deletions Test_CYOA/Assets/Scripts/WorldUpdates.cs
Expand Up @@ -14,7 +14,8 @@ public class WorldUpdates : MonoBehaviour
public RaycastHit hit;

//Assets, all of them

public GameObject enemy1;
public GameObject enemy2;

//Initialize Game
void Awake ()
Expand All @@ -29,7 +30,6 @@ public class WorldUpdates : MonoBehaviour

}


void Update()
{
ray = Camera.main.ScreenPointToRay(Input.mousePosition);
Expand Down Expand Up @@ -140,7 +140,7 @@ public class WorldUpdates : MonoBehaviour
{
if (hit.transform.name == "PlayerPos10")
{
updateField = "update: moved";
updateField = "could this be the end?";
}

}
Expand Down Expand Up @@ -176,7 +176,7 @@ public class WorldUpdates : MonoBehaviour
{
if (hit.transform.name == "HealthKit")
{
updateField = "update: healt restored to full!";
updateField = "update: health restored!";
}

}
Expand Down Expand Up @@ -279,6 +279,21 @@ public class WorldUpdates : MonoBehaviour
}


//Level up
if (Physics.Raycast(ray, out hit))
{
if (Input.GetKeyDown(KeyCode.Mouse0))
{
if (hit.transform.name == "XPCube")
{
updateField = "level up! your durability has increased.";
}

}
}



//Text - Update Field -- Keep Last
updates.text = updateField;

Expand Down
9 changes: 9 additions & 0 deletions Test_CYOA/Assets/WorldAssets.meta

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

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

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

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

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

Binary file modified Test_CYOA/Library/CurrentLayout.dwlt
Binary file not shown.
Binary file modified Test_CYOA/Library/ScriptAssemblies/Assembly-CSharp.dll.mdb
Binary file not shown.
Binary file modified Test_CYOA/Library/assetDatabase3
Binary file not shown.
Binary file modified Test_CYOA/Library/expandedItems
Binary file not shown.
Binary file modified Test_CYOA/Library/metadata/00/00000000000000004000000000000000
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 Test_CYOA/Library/metadata/9f/9f1a7051343fb0945bd017cf40955ea6
Binary file not shown.
Binary file modified Test_CYOA/Library/metadata/c2/c258fce83fd3dd24bbb58cbb8bbe504e
Binary file not shown.
Binary file modified Test_CYOA/Library/metadata/d9/d928191460a3b3146888f7b669385d64
Binary file not shown.
Binary file modified Test_CYOA/Library/metadata/e8/e89b08af6b41f2f428ba26892718a73d
Binary file not shown.
2 changes: 1 addition & 1 deletion Test_CYOA/Test_CYOA.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

0 comments on commit ef75701

Please sign in to comment.