Skip to content

Commit

Permalink
start score funtionality
Browse files Browse the repository at this point in the history
  • Loading branch information
ignurof committed Jan 18, 2021
1 parent 9fe3b07 commit 55a610f
Show file tree
Hide file tree
Showing 8 changed files with 349 additions and 10 deletions.
275 changes: 268 additions & 7 deletions FlyingDog/Assets/Scenes/SampleScene.unity

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion FlyingDog/Assets/Scripts/MoveObstacle.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ public class MoveObstacle : MonoBehaviour

private int destroyTime = 9;

private float speed = 6;
private float speed = 10;

private void Start()
{
Expand Down
2 changes: 1 addition & 1 deletion FlyingDog/Assets/Scripts/ObstacleSpawner.cs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ IEnumerator RandomSpawnerGenerator()
topObj.GetComponent<MoveObstacle>().position = "top";
break;
}
yield return new WaitForSeconds(2);
yield return new WaitForSeconds(1);
waitingSpawn = true;
}
}
2 changes: 1 addition & 1 deletion FlyingDog/Assets/Scripts/PlayerController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
public class PlayerController : MonoBehaviour
{
//public float speed;
private float updownSpeed = 4;
private float updownSpeed = 10;
private float verticalInput;

// Update is called once per frame
Expand Down
18 changes: 18 additions & 0 deletions FlyingDog/Assets/Scripts/Score.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class Score
{
private int score;

public int GetScore()
{
return score;
}

public void AddScore(int x)
{
score += x;
}
}
11 changes: 11 additions & 0 deletions FlyingDog/Assets/Scripts/Score.cs.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 55a610f

Please sign in to comment.