Skip to content

Commit

Permalink
Chore: game balance patch, add Hellmode
Browse files Browse the repository at this point in the history
  • Loading branch information
0dOj committed May 16, 2022
1 parent c9405e0 commit 9d554ea
Show file tree
Hide file tree
Showing 175 changed files with 62 additions and 37 deletions.
4 changes: 2 additions & 2 deletions Assets/Scenes/MainScene.unity
Original file line number Diff line number Diff line change
Expand Up @@ -405,7 +405,7 @@ Transform:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 450952854}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: -1.95, y: 6.8, z: 0}
m_LocalPosition: {x: -1.95, y: 8.67, z: 0}
m_LocalScale: {x: 1.0442, y: 1.0442, z: 1.0442}
m_ConstrainProportionsScale: 0
m_Children: []
Expand Down Expand Up @@ -1865,7 +1865,7 @@ RectTransform:
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 400, y: 80}
m_SizeDelta: {x: 400, y: 200}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &2045400064
MonoBehaviour:
Expand Down
12 changes: 9 additions & 3 deletions Assets/Scripts/BackgroundMove.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,15 @@ void Update()
{
if(Time.timeScale == 0)
return;

gameObject.transform.localPosition += new Vector3(-0.01f * Level.gameLevel, 0, 0);

if(Level.Hellmode == 2)
{
gameObject.transform.localPosition += new Vector3(-0.01f * (Level.gameLevel + 0.5f), 0, 0);
}
else
{
gameObject.transform.localPosition += new Vector3(-0.01f * Level.gameLevel, 0, 0);
}

_count = 2 + (int) (-gameObject.transform.localPosition.x / 7f);

if(_index != _count)
Expand Down
19 changes: 19 additions & 0 deletions Assets/Scripts/BirdControl.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ public class BirdControl : MonoBehaviour
public Text WinUI;

public static bool gameover = false;
private float birdcolor = 255f;
SpriteRenderer bird;


// Start is called before the first frame update
void Start()
Expand All @@ -17,6 +20,7 @@ void Start()
Screen.SetResolution(480, 800, false);
RestartUI.gameObject.SetActive(false);
WinUI.gameObject.SetActive(false);
bird = GetComponent<SpriteRenderer>();
}

// Update is called once per frame
Expand All @@ -38,11 +42,25 @@ void Update()
Application.LoadLevel("MainScene");
RestartUI.gameObject.SetActive(false);
WinUI.gameObject.SetActive(false);
Level.Hellmode = 1;
}
if(Level.gameLevel == 0f)
{
gameObject.transform.localPosition += new Vector3(0.1f, 0, 0);
WinUI.gameObject.SetActive(true);
if (Level.Hellmode == 1)
{
WinUI.text = "You Win!\nThanks For Playing!\nPress 'H' Key to\ntry HELLMODE...";
}
if (Level.Hellmode == 2)
{
WinUI.text = "You Win 'HELLMODE'!\nThanks for Playing!";
}
}
if (Level.Hellmode == 2 && birdcolor > 100)
{
birdcolor -= 0.5f;
bird.material.color = new Color(255/255f, birdcolor/255f, birdcolor/255f);
}
}
void OnCollisionEnter2D(Collision2D coll)
Expand All @@ -55,4 +73,5 @@ void OnCollisionEnter2D(Collision2D coll)
gameObject.GetComponent<Animator>().Play("Die");
}
}

}
41 changes: 15 additions & 26 deletions Assets/Scripts/ColumnMaker.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ public class ColumnMaker : MonoBehaviour // 특) 코드 개더러움
public int score = -2;

private float nowTime;
private float makeTime = 2.5f;
private float makeTime = 2f;

public Text ScoreUI;

Expand All @@ -36,25 +36,25 @@ void Update()
float RandomC = Random.Range(1f, 0f);
float RandomR = Random.Range(1f, 0f);

if(Level.gameLevel > 1.2)
if(Level.gameLevel > 1.2 || Level.Hellmode == 2)
{
if(RandomC < 0.40 * (Level.gameLevel - 1))
{
GameObject temp = Instantiate(FColumn);
temp.transform.parent = gameObject.transform;

float randomY = Random.Range(4f, 1f);
float randomY = Random.Range(7f, 3.5f);
temp.transform.localPosition = new Vector3(-gameObject.transform.localPosition.x + 10f, randomY, 0);
temp.transform.localScale = new Vector3(1, 1, 1);
if(Level.gameLevel > 1.7)
if(Level.gameLevel > 1.7 || Level.Hellmode == 2)
{
if(RandomR < 0.40 * (Level.gameLevel - 1))
{
temp.transform.rotation = Quaternion.Euler(0,0,15);
temp.transform.rotation = Quaternion.Euler(0,0,15 * Level.Hellmode);
}
if(RandomR > 1 - 0.40 * (Level.gameLevel - 1))
{
temp.transform.rotation = Quaternion.Euler(0,0,-15);
temp.transform.rotation = Quaternion.Euler(0,0,-15 * Level.Hellmode);
}
}

Expand All @@ -64,18 +64,18 @@ void Update()
GameObject temp = Instantiate(RColumn);
temp.transform.parent = gameObject.transform;

float randomY = Random.Range(1f, -2f);
float randomY = Random.Range(-1.5f, -5f);
temp.transform.localPosition = new Vector3(-gameObject.transform.localPosition.x + 10f, randomY, 0);
temp.transform.localScale = new Vector3(1, 1, 1);
if(Level.gameLevel > 1.7)
if(Level.gameLevel > 1.7 || Level.Hellmode == 2)
{
if(RandomR < 0.40 * (Level.gameLevel - 1))
{
temp.transform.rotation = Quaternion.Euler(0,0,15);
temp.transform.rotation = Quaternion.Euler(0,0,15 * Level.Hellmode);
}
if(RandomR > 1 - 0.40 * (Level.gameLevel - 1) * 4)
{
temp.transform.rotation = Quaternion.Euler(0,0,-15);
temp.transform.rotation = Quaternion.Euler(0,0,-15 * Level.Hellmode);
}
}
}
Expand All @@ -84,18 +84,18 @@ void Update()
GameObject temp = Instantiate(Column);
temp.transform.parent = gameObject.transform;

float randomY = Random.Range(4f, -2f);
float randomY = Random.Range(3.75f, -1.75f);
temp.transform.localPosition = new Vector3(-gameObject.transform.localPosition.x + 10f, randomY, 0);
temp.transform.localScale = new Vector3(1, 1, 1);
if(Level.gameLevel > 1.4)
if(Level.gameLevel > 1.4 || Level.Hellmode == 2)
{
if(RandomR < 0.40 * (Level.gameLevel - 1))
{
temp.transform.rotation = Quaternion.Euler(0,0,15);
temp.transform.rotation = Quaternion.Euler(0,0,15 * Level.Hellmode);
}
if(RandomR > 1 - 0.40 * (Level.gameLevel - 1))
{
temp.transform.rotation = Quaternion.Euler(0,0,-15);
temp.transform.rotation = Quaternion.Euler(0,0,-15 * Level.Hellmode);
}
}
}
Expand All @@ -108,17 +108,6 @@ void Update()
float randomY = Random.Range(4f, -2f);
temp.transform.localPosition = new Vector3(-gameObject.transform.localPosition.x + 10f, randomY, 0);
temp.transform.localScale = new Vector3(1, 1, 1);
if(Level.gameLevel > 1.4)
{
if(RandomR < 0.40 * (Level.gameLevel - 1))
{
temp.transform.rotation = Quaternion.Euler(0,0,30);
}
if(RandomR > 1 - 0.40 * (Level.gameLevel - 1))
{
temp.transform.rotation = Quaternion.Euler(0,0,-30);
}
}
}


Expand All @@ -134,6 +123,6 @@ void Update()
}

Level.cancel = false;
makeTime = 2.5f / Level.gameLevel;
makeTime = 2f;
}
}
2 changes: 1 addition & 1 deletion Assets/Scripts/FallingColumn.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ void Start()
// Update is called once per frame
void Update()
{
gameObject.transform.localPosition += new Vector3(0, -0.01f * Level.gameLevel, 0);
gameObject.transform.Translate(new Vector3(0, -0.01f * Level.gameLevel * Level.Hellmode, 0));
}
}
11 changes: 8 additions & 3 deletions Assets/Scripts/GroundMove.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,14 @@ void Update()
{
if(Time.timeScale == 0)
return;

gameObject.transform.localPosition += new Vector3(-0.04f * Level.gameLevel, 0, 0); // 바닥이동, 속도조절 필요

if(Level.Hellmode == 2)
{
gameObject.transform.localPosition += new Vector3(-0.04f * (Level.gameLevel + 0.5f), 0, 0);
}
else
{
gameObject.transform.localPosition += new Vector3(-0.04f * Level.gameLevel, 0, 0);
}
_count = 2 + (int) (-gameObject.transform.localPosition.x / 7.67f);

if(_index != _count)
Expand Down
6 changes: 6 additions & 0 deletions Assets/Scripts/Level.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ public class Level : MonoBehaviour
public static float gameTime;
public static float gameLevel = 1f;
public static bool cancel = false;
public static int Hellmode = 1;

// Start is called before the first frame update
void Start()
{
Expand Down Expand Up @@ -40,5 +42,9 @@ void Update()
cancel = true;

}
if (Input.GetKeyDown(KeyCode.H) && gameTime < 300f)
{
Hellmode = 2;
}
}
}
2 changes: 1 addition & 1 deletion Assets/Scripts/RisingColumn.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ void Start()
// Update is called once per frame
void Update()
{
gameObject.transform.localPosition += new Vector3(0, 0.01f * Level.gameLevel, 0);
gameObject.transform.Translate(new Vector3(0, 0.01f * Level.gameLevel * Level.Hellmode, 0));
}
}
Binary file modified Bulid/JYD FlappyBird_Data/Managed/Assembly-CSharp.dll
Binary file not shown.
Binary file modified Bulid/JYD FlappyBird_Data/Plugins/x86_64/lib_burst_generated.dll
Binary file not shown.
Binary file modified Bulid/JYD FlappyBird_Data/globalgamemanagers
Binary file not shown.
Binary file modified Bulid/JYD FlappyBird_Data/level0
Binary file not shown.
Binary file modified Bulid/JYD FlappyBird_Data/sharedassets0.assets
Binary file not shown.
Binary file modified Bulid/JYD FlappyBird_Data/sharedassets0.assets.resS
Binary file not shown.
File renamed without changes.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added JYD FlappyBird v1.0.2/JYD FlappyBird_Data/level0
Binary file not shown.
Binary file not shown.
Binary file not shown.
File renamed without changes.
File renamed without changes.
Binary file removed JYD FlappyBird v1.0/JYD FlappyBird_Data/level0
Binary file not shown.
Binary file not shown.
2 changes: 1 addition & 1 deletion ProjectSettings/ProjectSettings.asset
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ PlayerSettings:
16:10: 0
16:9: 0
Others: 0
bundleVersion: 1.0.1
bundleVersion: 1.0.2
preloadedAssets: []
metroInputSource: 0
wsaTransparentSwapchain: 0
Expand Down

0 comments on commit 9d554ea

Please sign in to comment.