7 Commits

Author SHA1 Message Date
7f7596e0c4 Explosion particles now 2024-11-03 22:13:01 -08:00
cbfd83e9e2 Merge branch 'main' into awman 2024-11-03 22:10:58 -08:00
f5d183322e Create Creeper prefab 2024-10-28 16:16:24 -07:00
76a807f599 Create Creeper script 2024-10-28 15:39:01 -07:00
ProtoSharkk
bd1090aabe Merge pull request #10 from ProtoSharkk/variants
Gun thrower ratbots
2024-10-27 19:19:14 -07:00
Iazubi
1e878b2b67 Update README.md 2024-10-27 02:05:58 -07:00
Iazubi
8f970dfbc2 Update README.md 2024-10-27 02:01:45 -07:00
9 changed files with 5263 additions and 26 deletions

5162
Assets/Enemy/Creeper.prefab Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: ffe7e66eebc0e53d993926c0304591da
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -685,6 +685,7 @@ MonoBehaviour:
ratbot: {fileID: 398740452138961375, guid: 5887eeeb7c78eb5c7bf46c5893fd4846, type: 3}
gunThrower: {fileID: 398740452138961375, guid: b1e1e6378fb12d47e989565896a737ef, type: 3}
fastFucker: {fileID: 7192111562784377269, guid: 2c67a9ffe3cbdc6989fcabe398ffd2dc, type: 3}
creeper: {fileID: 398740452138961375, guid: ffe7e66eebc0e53d993926c0304591da, type: 3}
--- !u!4 &745837569
Transform:
m_ObjectHideFlags: 0

View File

@@ -8,12 +8,14 @@ public class GameState : MonoBehaviour
public GameObject ratbot;
public GameObject gunThrower;
public GameObject fastFucker;
public GameObject creeper;
int[] counts = new int[3];
int[] counts = new int[4];
enum CountIndex : uint {
ratbot = 0,
gunThrower = 1,
fastFucker = 2
fastFucker = 2,
creeper = 3
}
void Start() {
@@ -71,19 +73,26 @@ public class GameState : MonoBehaviour
wave++;
}
public GameObject SpawnRatbot() {
return creeper;
// TODO: Convert this mess into a switch case
if (counts[(uint)CountIndex.gunThrower] < wave/3
&& wave > 3
&& wave > 2
) {
counts[(uint)CountIndex.gunThrower]++;
return gunThrower;
}
if (counts[(uint)CountIndex.fastFucker] < wave/4
&& wave > 2
&& wave > 3
) {
counts[(uint)CountIndex.fastFucker]++;
return fastFucker;
}
if (counts[(uint)CountIndex.creeper] < wave/6
&& wave > 4
) {
counts[(uint)CountIndex.creeper]++;
return creeper;
}
return ratbot;
}
}

View File

@@ -0,0 +1,26 @@
using UnityEngine;
public class Creeper : Ratbot
{
public GameObject particles;
float countdown;
void Update() {
if (Vector3.Distance(player.transform.position, transform.position) > 5) {
MoveTowardsPlayer(moveSpeed);
float newTime = countdown + Time.deltaTime;
countdown = Mathf.Min(newTime, 1);
} else {
countdown -= Time.deltaTime;
if (countdown < 0) Explode();
}
transform.GetChild(0).localScale = new Vector3 (countdown * 3.5F, 0.25F, 1);
}
void Explode() {
Destroy(gameObject);
Instantiate(particles);
if (Vector3.Distance(player.transform.position, transform.position) < 5) {
player.GetComponent<Teo>().health -= damageStrength;
}
}
}

View File

@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: d23c0105448702c45b209f27f497780f

View File

@@ -6,7 +6,7 @@ public class FastFucker : Ratbot
bool attack = true;
void Update() {
if (attack)
MoveTowardsPlayer(moveSpeed*2);
MoveTowardsPlayer(moveSpeed*3);
else
MoveAwayFromPlayer(moveSpeed);
}
@@ -27,8 +27,4 @@ public class FastFucker : Ratbot
yield return new WaitForSeconds (1F);
attack = true;
}
new void Damage (float hurtyAmount) {
RunAway();
base.Damage(hurtyAmount);
}
}

View File

@@ -46,6 +46,7 @@ public class Ratbot : MonoBehaviour
// Die if health below zero
public void Damage(float hurtyAmount) {
Debug.Log(hurtyAmount);
health -= hurtyAmount;
if (health <= 0) {
Destroy(gameObject);

View File

@@ -1,5 +1,43 @@
# RatStabber
![TeoSword_clear](https://github.com/user-attachments/assets/5cc699a3-c4a2-47c5-9d7f-10f8546ad48f)
### Fight off the ratbots and save the rat cities as the hunky man Teo himself! (and all the goofy ai generated images of him and everyone else)
## LORE:
After successfully defeating the Paulbots, the rat took components of the Paulbots and improved the design to create the rat bots. He could finally get revenge on Paul for the destruction of his kind. However, the Paul Bots managed to regain consciousness inside of the new and improved Rat Bots, making the Ratbots turn against the rat, taking his weapons and his last hopes of defeating Paul. You (Teo) have arrived to protect the rat and help him figure out a way to stop the now evil rat bots and discover the dark, hidden secrets while ending this war once and for all.
## And that's the game... I guess...
### Alright, Here's the Basic Vision:
- The Player (Teo) moves around an infinite field with the camera following the player
@@ -39,7 +77,7 @@
- [x] Wave spawns enemies
- [x] Detect when wave ends
- [x] Activate new waves after powerup has been chosen by player
- [ ] Dash ability
- [x] Dash ability
### Enemy:
- [x] All Enemies have simple pathfinding towards the player
@@ -60,34 +98,29 @@
### In-Game UI:
- [x] Player health on bottom left
- [ ] Round / Wave on bottom left (?)
- [x] Round / Wave on bottom left (?)
- [ ] Maybe show enemy remaining count? (We can make a hard mode that removes UI except health)
- [ ] Upon round end, pop-up menu for selecting powerup
- [x] Damage
- [ ] Attack distance
- [ ] Attack range
- [ ] Attack cooldown
- [x] Attack distance
- [x] Attack range
- [x] Attack cooldown
- [x] Health
- [x] Speed
- [ ] Dash cooldown
- [ ] Dash distance
- [x] Dash cooldown
- [x] Dash distance
- [ ] (Only an idea for now) Have a status bar at the bottom right to show your current stats
### UI / AUDIO:
- [ ] Menu Screen
- [x] Menu Screen
- [ ] Pause Screen
- [ ] Option for returning to main menu / resume
- [ ] Menu Music
- [ ] Level Music
- [ ] A section where the player can view unlocked lore by completing more of the game
## LORE:
After successfully defeating the Paul bots, the rat improved upon the design to create the rat bots. He could finally get revenge on Paul for the destruction of his kind. However, the Paul Bots managed to regain consciousness inside of the new and improved Rat Bots, in-turn making the Ratbots turn against the rat, taking his weapons and his last hopes of defeating Paul as well. You (Teo) have arrived to protect the rat and help him figure out a way to stop the now evil rat bots and put an end to this war once and for all.
- [x] Menu Music
- [x] Level Music
- [x] A section where the player can view unlocked lore by completing more of the game
- [ ] LORE GETS UNLOCKED EVERY 10 ROUNDS BEATEN + BOSS BEATEN