Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
C level work
  • Loading branch information
smz11006 committed Dec 15, 2015
1 parent bbf0357 commit 0aa4d3e
Show file tree
Hide file tree
Showing 62 changed files with 636 additions and 2 deletions.
Binary file modified Roguelike2d/Assets/Prefabs/Enemies/Megabot_Melee.prefab
Binary file not shown.
Binary file modified Roguelike2d/Assets/Prefabs/Enemies/Megabot_Ranged.prefab
Binary file not shown.
Binary file not shown.
8 changes: 8 additions & 0 deletions Roguelike2d/Assets/Prefabs/Enemies/Projectile.prefab.meta

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

Binary file modified Roguelike2d/Assets/Prefabs/Enemies/Skull_Melee.prefab
Binary file not shown.
Binary file modified Roguelike2d/Assets/Prefabs/Enemies/Skull_Ranged.prefab
Binary file not shown.
Binary file modified Roguelike2d/Assets/Prefabs/Environment/Coin.prefab
Binary file not shown.
Binary file modified Roguelike2d/Assets/Prefabs/Environment/Health.prefab
Binary file not shown.
Binary file modified Roguelike2d/Assets/Prefabs/Environment/Powerup.prefab
Binary file not shown.
Binary file modified Roguelike2d/Assets/Prefabs/Environment/Wall1.prefab
Binary file not shown.
Binary file modified Roguelike2d/Assets/Prefabs/Environment/Wall2.prefab
Binary file not shown.
Binary file not shown.
8 changes: 8 additions & 0 deletions Roguelike2d/Assets/Prefabs/Persistence/Charge (1).prefab.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 Roguelike2d/Assets/Prefabs/Persistence/Cores (1).prefab.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 Roguelike2d/Assets/Prefabs/Persistence/Health (1).prefab.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 Roguelike2d/Assets/Prefabs/Persistence/Score (1).prefab.meta

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

Binary file modified Roguelike2d/Assets/Prefabs/Persistence/UIElementController.prefab
Binary file not shown.
Binary file added Roguelike2d/Assets/Prefabs/Player/Attack.prefab
Binary file not shown.
8 changes: 8 additions & 0 deletions Roguelike2d/Assets/Prefabs/Player/Attack.prefab.meta

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

Binary file modified Roguelike2d/Assets/Prefabs/Player/Player.prefab
Binary file not shown.
Binary file added Roguelike2d/Assets/Scenes/Controls.unity
Binary file not shown.
8 changes: 8 additions & 0 deletions Roguelike2d/Assets/Scenes/Controls.unity.meta

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

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

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

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

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

Binary file modified Roguelike2d/Assets/Scenes/ProcGenTest.unity
Binary file not shown.
50 changes: 50 additions & 0 deletions Roguelike2d/Assets/Script/Archer.cs
@@ -0,0 +1,50 @@
using UnityEngine;
using System.Collections;

public class Archer : MonoBehaviour
{
public int ammo = 5;

public Transform target;//set target from inspector instead of looking in Update
public float speed = 1f;
public GameObject player = GameObject.Find("Player");
// public Vector2 playerSpot;
public Vector2 enemySpot;
public float distance;

public GameObject projectile;

public Transform player2;
// Use this for initialization
void Start()
{

}

// Update is called once per frame
void Update()
{
//rotate to look at the player
transform.LookAt(target.position);
transform.Rotate(new Vector3(0, -90, 0), Space.Self);//correcting the original rotation


//move towards the player
if (Vector3.Distance(transform.position, target.position) > 3f)
{//move if distance from target is greater than 1
transform.Translate(new Vector3(speed * Time.deltaTime, 0, 0));
if (ammo > 0)
{
GameObject spawn = Instantiate(projectile, new Vector2(transform.position.x, transform.position.y), Quaternion.Euler(0, 0, 0)) as GameObject;
ammo = ammo - 1;
}

}






}
}
12 changes: 12 additions & 0 deletions Roguelike2d/Assets/Script/Archer.cs.meta

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

61 changes: 61 additions & 0 deletions Roguelike2d/Assets/Script/LargeArcher.cs
@@ -0,0 +1,61 @@
using UnityEngine;
using System.Collections;

public class LargeArcher : MonoBehaviour {
public int ammo = 10;

public Transform target;//set target from inspector instead of looking in Update
public float speed = 1f;
public GameObject player = GameObject.Find("Player");
// public Vector2 playerSpot;
public Vector2 enemySpot;
public float distance;

public GameObject projectile;

public Vector2 backupPos = new Vector2(7,7);

public Transform player2;
// Use this for initialization
void Start()
{

}

// Update is called once per frame
void Update()
{
//rotate to look at the player
transform.LookAt(target.position);
transform.Rotate(new Vector3(0, -90, 0), Space.Self);//correcting the original rotation


//move towards the player
if (Vector3.Distance(transform.position, target.position) > 3f)
{//move if distance from target is greater than 1
transform.Translate(new Vector3(speed * Time.deltaTime, 0, 0));
if (ammo > 0)
{
GameObject spawn = Instantiate(projectile, new Vector2(transform.position.x, transform.position.y), Quaternion.Euler(0, 0, 0)) as GameObject;
ammo = ammo - 1;
}

}
//if (Vector3.Distance(transform.position, target.position) < 2f)
//{
// transform.Translate(new Vector3(speed * Time.deltaTime, 7, 7));

//}
//if (Vector3.Distance(transform.position, target.position) > 7f)
//{
// ammo = 10;
//}







}
}
12 changes: 12 additions & 0 deletions Roguelike2d/Assets/Script/LargeArcher.cs.meta

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

38 changes: 38 additions & 0 deletions Roguelike2d/Assets/Script/LargeRobot.cs
@@ -0,0 +1,38 @@
using UnityEngine;
using System.Collections;

public class LargeRobot : MonoBehaviour {

public Transform target;//set target from inspector instead of looking in Update
public float speed = 1f;
public GameObject player = GameObject.Find("Player");
// public Vector2 playerSpot;
public Vector2 enemySpot;
public float distance;

public Transform player2;
// Use this for initialization
void Start()
{

}

// Update is called once per frame
void Update()
{
//rotate to look at the player
transform.LookAt(target.position);
transform.Rotate(new Vector3(0, -90, 0), Space.Self);//correcting the original rotation


//move towards the player
if (Vector3.Distance(transform.position, target.position) > 2f)
{//move if distance from target is greater than 1
transform.Translate(new Vector3(speed * Time.deltaTime, 0, 0));
}




}
}
12 changes: 12 additions & 0 deletions Roguelike2d/Assets/Script/LargeRobot.cs.meta

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

29 changes: 29 additions & 0 deletions Roguelike2d/Assets/Script/MenuScript.cs
@@ -0,0 +1,29 @@
using UnityEngine;
using System.Collections;

public class MenuScript : MonoBehaviour {

// Use this for initialization
void Start () {

}

// Update is called once per frame
void Update () {

}

public void StartGame()
{
Application.LoadLevel(1);
}
public void ControlMenu()
{
Application.LoadLevel(2);
}
public void ReturnToMenu()
{
Application.LoadLevel(0);
}

}
12 changes: 12 additions & 0 deletions Roguelike2d/Assets/Script/MenuScript.cs.meta

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

2 changes: 1 addition & 1 deletion Roguelike2d/Assets/Script/NextLevel.cs
Expand Up @@ -11,7 +11,7 @@ public class NextLevel : MonoBehaviour {
{
checker = checker + 1;
Debug.Log("HitExit");
Application.LoadLevel(0);
Application.LoadLevel(1);
}
}
}

0 comments on commit 0aa4d3e

Please sign in to comment.