This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class Condition { | |
| [Serializable] | |
| public struct ConditionByAmount { | |
| [Tooltip("Wheter the condition is by amount or not")] | |
| public bool isConditionByAmount; | |
| [Tooltip("Check for amount of coins, uncheck for amount of score")] | |
| public bool isAmountCoin; | |
| [Tooltip("The targeted amount")] | |
| public int targetAmount; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| private void SpawnHitable() { | |
| while (_isSelectingPool) { | |
| ObjectPool<Hitable> pool = GetRandomPool(); | |
| Hitable hitable = pool.Get(); | |
| hitable.GetComponent<Hitable>().SetKill(hitable => Kill(pool, hitable)); | |
| // ... | |
| if (!CheckShouldSpawn(hitable)) | |
| pool.Release(hitable); | |
| } | |
| _isSelectingPool = true; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| private void Update() { | |
| if (GameManager.Instance.isGameRunning) | |
| GameManager.CallRepeating(SpawnHitable, ref _timer, repeatRate); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class MoveLeftAndRepeat : MonoBehaviour { | |
| [Range(0f, 1f)] | |
| [SerializeField] private float _customSpeed = 1f; | |
| private Vector3 _startPos; | |
| private float _repeatWidth; | |
| private void Start() { | |
| _startPos = transform.position; | |
| _repeatWidth = GetComponent<BoxCollider>().size.x / 2 - GetComponent<BoxCollider>().center.x; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [*.{cs,vb}] | |
| dotnet_diagnostic.IDE0044.severity = none | |
| dotnet_diagnostic.IDE0047.severity = none | |
| # IDE0051 Private member is unused. | |
| dotnet_diagnostic.IDE0051.severity = none | |
| dotnet_diagnostic.IDE0090.severity = none |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # This .gitignore file should be placed at the root of your Unity project directory | |
| # | |
| # Get latest from https://github.com/github/gitignore/blob/main/Unity.gitignore | |
| # | |
| /[Ll]ibrary/ | |
| /[Tt]emp/ | |
| /[Oo]bj/ | |
| /[Bb]uild/ | |
| /[Bb]uilds/ | |
| /[Ll]ogs/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # | |
| # Git attributes for Unity projects | |
| # | |
| # Compiled by the GameCI community - https://game.ci | |
| # | |
| # Latest version at https://gist.github.com/webbertakken/ff250a0d5e59a8aae961c2e509c07fbc | |
| # | |
| # Ensure that text files that any contributor introduces to the repository have their line endings normalized | |
| * text=auto |