Skip to content
Snippets Groups Projects
Commit 8092cfab authored by Salomo309's avatar Salomo309
Browse files

feat: add cheats

parent 30860c7f
Branches
No related merge requests found
......@@ -7,6 +7,8 @@ namespace Nightmare
public int startingGold = 100;
public int currentGold;
public bool isMotherlode = false;
void Awake()
{
currentGold = startingGold;
......@@ -29,6 +31,7 @@ namespace Nightmare
public void CheatMotherlode()
{
isMotherlode = true;
currentGold = int.MaxValue;
}
}
......
......@@ -60,7 +60,7 @@ namespace Nightmare
// ... transition the colour back to clear.
damageImage.color = Color.Lerp(damageImage.color, Color.clear, flashSpeed * Time.deltaTime);
}
// Reset the damaged flag.
damaged = false;
}
......@@ -116,7 +116,7 @@ namespace Nightmare
EventManager.TriggerEvent("GameOver");
}
private void CheatNoDamage()
public void CheatNoDamage()
{
godMode = true;
currentHealth = int.MaxValue;
......
......@@ -14,7 +14,7 @@ namespace Nightmare
#if !MOBILE_INPUT
int floorMask; // A layer mask so that a ray can be cast just at gameobjects on the floor layer.
float camRayLength = 100f; // The length of the ray from the camera into the scene.
bool isDoubleSpeed = false;
public bool isDoubleSpeed = false;
#endif
void Awake ()
......@@ -124,7 +124,7 @@ namespace Nightmare
anim.SetBool ("IsWalking", walking);
}
private void CheatDoubleSpeed()
public void CheatDoubleSpeed()
{
isDoubleSpeed = true;
speed = speed * 2;
......
......@@ -14,7 +14,7 @@ namespace Nightmare
public float grenadeSpeed = 200f;
public float grenadeFireDelay = 0.5f;
bool isOneHitKill = false;
public bool isOneHitKill = false;
float timer;
Ray shootRay = new Ray();
......@@ -190,35 +190,29 @@ namespace Nightmare
//grenadeClone.Shoot(grenadeSpeed * transform.forward);
}
private void CheatOneHitKill()
public void CheatOneHitKill()
{
isOneHitKill = true;
damagePerShot = 9999;
}
private void CheatPetFullHP()
{
// Pulihkan kesehatan pet ke penuh
// Misalnya:
// petHealth.RestoreHealth();
}
private void CheatKillPet()
public void CheatKillPet()
{
// Bunuh pet
// Misalnya:
// petHealth.TakeDamage(petHealth.CurrentHealth());
}
private void CheatOrb()
public void CheatOrb()
{
// Hasilkan orb
// Misalnya:
// orbSpawner.SpawnOrb();
}
private void CheatSkipLevel()
public void CheatSkipLevel()
{
// Loncati level saat ini
// Misalnya:
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment