Skip to content
Permalink
Browse files

C level work

  • Loading branch information
smz11006 committed Dec 15, 2015
1 parent bbf0357 commit 0aa4d3e02a72cd51d1629be3a18d70f7d766fec5
Showing with 636 additions and 2 deletions.
  1. BIN Roguelike2d/Assets/Prefabs/Enemies/Megabot_Melee.prefab
  2. BIN Roguelike2d/Assets/Prefabs/Enemies/Megabot_Ranged.prefab
  3. BIN Roguelike2d/Assets/Prefabs/Enemies/Projectile.prefab
  4. +8 −0 Roguelike2d/Assets/Prefabs/Enemies/Projectile.prefab.meta
  5. BIN Roguelike2d/Assets/Prefabs/Enemies/Skull_Melee.prefab
  6. BIN Roguelike2d/Assets/Prefabs/Enemies/Skull_Ranged.prefab
  7. BIN Roguelike2d/Assets/Prefabs/Environment/Coin.prefab
  8. BIN Roguelike2d/Assets/Prefabs/Environment/Health.prefab
  9. BIN Roguelike2d/Assets/Prefabs/Environment/Powerup.prefab
  10. BIN Roguelike2d/Assets/Prefabs/Environment/Wall1.prefab
  11. BIN Roguelike2d/Assets/Prefabs/Environment/Wall2.prefab
  12. BIN Roguelike2d/Assets/Prefabs/Persistence/Charge (1).prefab
  13. +8 −0 Roguelike2d/Assets/Prefabs/Persistence/Charge (1).prefab.meta
  14. BIN Roguelike2d/Assets/Prefabs/Persistence/Cores (1).prefab
  15. +8 −0 Roguelike2d/Assets/Prefabs/Persistence/Cores (1).prefab.meta
  16. BIN Roguelike2d/Assets/Prefabs/Persistence/Health (1).prefab
  17. +8 −0 Roguelike2d/Assets/Prefabs/Persistence/Health (1).prefab.meta
  18. BIN Roguelike2d/Assets/Prefabs/Persistence/Score (1).prefab
  19. +8 −0 Roguelike2d/Assets/Prefabs/Persistence/Score (1).prefab.meta
  20. BIN Roguelike2d/Assets/Prefabs/Persistence/UIElementController.prefab
  21. BIN Roguelike2d/Assets/Prefabs/Player/Attack.prefab
  22. +8 −0 Roguelike2d/Assets/Prefabs/Player/Attack.prefab.meta
  23. BIN Roguelike2d/Assets/Prefabs/Player/Player.prefab
  24. BIN Roguelike2d/Assets/Scenes/Controls.unity
  25. +8 −0 Roguelike2d/Assets/Scenes/Controls.unity.meta
  26. BIN Roguelike2d/Assets/Scenes/LoseScreen.unity
  27. +8 −0 Roguelike2d/Assets/Scenes/LoseScreen.unity.meta
  28. BIN Roguelike2d/Assets/Scenes/Menu.unity
  29. +8 −0 Roguelike2d/Assets/Scenes/Menu.unity.meta
  30. BIN Roguelike2d/Assets/Scenes/ProcGenTest.unity
  31. +50 −0 Roguelike2d/Assets/Script/Archer.cs
  32. +12 −0 Roguelike2d/Assets/Script/Archer.cs.meta
  33. +61 −0 Roguelike2d/Assets/Script/LargeArcher.cs
  34. +12 −0 Roguelike2d/Assets/Script/LargeArcher.cs.meta
  35. +38 −0 Roguelike2d/Assets/Script/LargeRobot.cs
  36. +12 −0 Roguelike2d/Assets/Script/LargeRobot.cs.meta
  37. +29 −0 Roguelike2d/Assets/Script/MenuScript.cs
  38. +12 −0 Roguelike2d/Assets/Script/MenuScript.cs.meta
  39. +1 −1 Roguelike2d/Assets/Script/NextLevel.cs
  40. +76 −0 Roguelike2d/Assets/Script/Pickups.cs
  41. +49 −0 Roguelike2d/Assets/Script/PlayerAttack.cs
  42. +15 −0 Roguelike2d/Assets/Script/PlayerAttack.cs.meta
  43. +1 −0 Roguelike2d/Assets/Script/PlayerMovement.cs
  44. +19 −0 Roguelike2d/Assets/Script/PlayerSpawn.cs
  45. +12 −0 Roguelike2d/Assets/Script/PlayerSpawn.cs.meta
  46. +42 −0 Roguelike2d/Assets/Script/Projectile.cs
  47. +12 −0 Roguelike2d/Assets/Script/Projectile.cs.meta
  48. +4 −1 Roguelike2d/Assets/Script/TextCore.cs
  49. +39 −0 Roguelike2d/Assets/Script/Zombie.cs
  50. +12 −0 Roguelike2d/Assets/Script/Zombie.cs.meta
  51. BIN Roguelike2d/Assets/Sprites/Enemy/Projectile.png
  52. +56 −0 Roguelike2d/Assets/Sprites/Enemy/Projectile.png.meta
  53. BIN Roguelike2d/Library/CurrentLayout.dwlt
  54. BIN Roguelike2d/Library/InspectorExpandedItems.asset
  55. BIN Roguelike2d/Library/ScriptAssemblies/Assembly-CSharp.dll.mdb
  56. BIN Roguelike2d/Library/assetDatabase3
  57. BIN Roguelike2d/Library/expandedItems
  58. BIN Roguelike2d/Library/metadata/00/00000000000000003000000000000000
  59. BIN Roguelike2d/Library/metadata/00/00000000000000004000000000000000
  60. BIN Roguelike2d/Library/metadata/00/0000000000000000b000000000000000
  61. BIN Roguelike2d/ProjectSettings/EditorBuildSettings.asset
  62. BIN Roguelike2d/ProjectSettings/TagManager.asset
Binary file not shown.
Binary file not shown.
Binary file not shown.

Some generated files are not rendered by default. Learn more.

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.

Some generated files are not rendered by default. Learn more.

Binary file not shown.

Some generated files are not rendered by default. Learn more.

Binary file not shown.

Some generated files are not rendered by default. Learn more.

Binary file not shown.

Some generated files are not rendered by default. Learn more.

Binary file not shown.
Binary file not shown.

Some generated files are not rendered by default. Learn more.

Binary file not shown.
Binary file not shown.

Some generated files are not rendered by default. Learn more.

Binary file not shown.

Some generated files are not rendered by default. Learn more.

Binary file not shown.

Some generated files are not rendered by default. Learn more.

Binary file not shown.
@@ -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;
}

}






}
}

Some generated files are not rendered by default. Learn more.

@@ -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;
//}







}
}

Some generated files are not rendered by default. Learn more.

@@ -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));
}




}
}

Some generated files are not rendered by default. Learn more.

@@ -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);
}

}

Some generated files are not rendered by default. Learn more.

@@ -11,7 +11,7 @@ void OnCollisionEnter2D(Collision2D col)
{
checker = checker + 1;
Debug.Log("HitExit");
Application.LoadLevel(0);
Application.LoadLevel(1);
}
}
}

0 comments on commit 0aa4d3e

Please sign in to comment.
You can’t perform that action at this time.