Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Int Scrip = Starting Combat Scripts
  • Loading branch information
smz11006 committed Oct 6, 2015
1 parent cf40009 commit 4d2b55d
Show file tree
Hide file tree
Showing 79 changed files with 553 additions and 3 deletions.
2 changes: 2 additions & 0 deletions Test_CYOA/Assembly-CSharp.csproj
Expand Up @@ -46,9 +46,11 @@
</ItemGroup>
<ItemGroup>
<Compile Include="Assets\Scripts\Camera_Control.cs" />
<Compile Include="Assets\Scripts\Combat.cs" />
<Compile Include="Assets\Scripts\HiddenRoom.cs" />
<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>
Expand Down
Binary file modified Test_CYOA/Assets/CYO_Layout.unity
Binary file not shown.
9 changes: 9 additions & 0 deletions Test_CYOA/Assets/Fonts.meta

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

Binary file added Test_CYOA/Assets/Fonts/Science Fair.otf
Binary file not shown.
19 changes: 19 additions & 0 deletions Test_CYOA/Assets/Fonts/Science Fair.otf.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/Camera_Control.cs
Expand Up @@ -81,8 +81,6 @@ public class Camera_Control : MonoBehaviour {
if (hit.transform.name == "PlayerPos1")
{
cameraPos = 1;
rot.eulerAngles = ang1;
transform.rotation = rot;
}

}
Expand Down
58 changes: 58 additions & 0 deletions Test_CYOA/Assets/Scripts/Combat.cs
@@ -0,0 +1,58 @@
using UnityEngine;
using System.Collections;
using UnityEngine.UI;

public class Combat : MonoBehaviour {

//Click References
public Ray ray;
public RaycastHit hit;


//Text Variables
public static int hpValue;

Text hpText;

//Game Objects
public GameObject enemy1;
public GameObject enemy2;

//Combat Variables
public int damage = 25;
public int damageEnemy = 25;
public int xp = 0;

public int enemy1HP = 75;
public int enemy2HP = 100;




//Initiate Game Stuff

void Awake()
{
hpText = GetComponent<Text>();

hpValue = 100;
}

void Update()
{
ray = Camera.main.ScreenPointToRay(Input.mousePosition);





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

//Fail State
if (hpValue <= 0)
{
Application.LoadLevel("CYO_Layout");
}
}
}
12 changes: 12 additions & 0 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.

0 comments on commit 4d2b55d

Please sign in to comment.