1 Commits

Author SHA1 Message Date
2c93456a19 Fast fuckers will run away on taking damage 2024-10-28 16:17:27 -07:00
9 changed files with 26 additions and 5263 deletions

File diff suppressed because it is too large Load Diff

View File

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

View File

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

View File

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

View File

@@ -1,26 +0,0 @@
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

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

View File

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

View File

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

View File

@@ -1,43 +1,5 @@
# RatStabber # 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: ### Alright, Here's the Basic Vision:
- The Player (Teo) moves around an infinite field with the camera following the player - The Player (Teo) moves around an infinite field with the camera following the player
@@ -77,7 +39,7 @@ After successfully defeating the Paulbots, the rat took components of the Paulbo
- [x] Wave spawns enemies - [x] Wave spawns enemies
- [x] Detect when wave ends - [x] Detect when wave ends
- [x] Activate new waves after powerup has been chosen by player - [x] Activate new waves after powerup has been chosen by player
- [x] Dash ability - [ ] Dash ability
### Enemy: ### Enemy:
- [x] All Enemies have simple pathfinding towards the player - [x] All Enemies have simple pathfinding towards the player
@@ -98,29 +60,34 @@ After successfully defeating the Paulbots, the rat took components of the Paulbo
### In-Game UI: ### In-Game UI:
- [x] Player health on bottom left - [x] Player health on bottom left
- [x] Round / Wave on bottom left (?) - [ ] Round / Wave on bottom left (?)
- [ ] Maybe show enemy remaining count? (We can make a hard mode that removes UI except health) - [ ] 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 - [ ] Upon round end, pop-up menu for selecting powerup
- [x] Damage - [x] Damage
- [x] Attack distance - [ ] Attack distance
- [x] Attack range - [ ] Attack range
- [x] Attack cooldown - [ ] Attack cooldown
- [x] Health - [x] Health
- [x] Speed - [x] Speed
- [x] Dash cooldown - [ ] Dash cooldown
- [x] Dash distance - [ ] Dash distance
- [ ] (Only an idea for now) Have a status bar at the bottom right to show your current stats - [ ] (Only an idea for now) Have a status bar at the bottom right to show your current stats
### UI / AUDIO: ### UI / AUDIO:
- [x] Menu Screen - [ ] Menu Screen
- [ ] Pause Screen - [ ] Pause Screen
- [ ] Option for returning to main menu / resume - [ ] Option for returning to main menu / resume
- [x] Menu Music - [ ] Menu Music
- [x] Level Music - [ ] Level Music
- [x] A section where the player can view unlocked lore by completing more of the game - [ ] A section where the player can view unlocked lore by completing more of the game
- [ ] LORE GETS UNLOCKED EVERY 10 ROUNDS BEATEN + BOSS BEATEN
## 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.