This file contains 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
using UnityEngine; | |
public class PlayerBehaviour : MonoBehaviour | |
{ | |
public float Speed; | |
public float JumpHeight; | |
public float MaxSlope; | |
public float DynamicFriction; |
This file contains 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
using UnityEngine; | |
public class EnvironmentQuery | |
{ | |
private readonly CharacterController _controller; | |
private readonly float _characterRayCastHeight; | |
private readonly float _radius; | |
public EnvironmentQuery(float characterRayCastHeight, float radius) | |
{ |
This file contains 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
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
using UnityEngine; | |
public class InputHandler : MonoBehaviour | |
{ |
This file contains 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 interface IImpulseCommand | |
{ | |
void Excute(); | |
} |
This file contains 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
namespace VendingMachines | |
{ | |
public class Product | |
{ | |
public Product(string name, int coins, int available) | |
{ | |
Name = name; | |
Coins = coins; | |
Available = available; | |
} |
This file contains 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 TimedQueue | |
{ | |
private float _dequeueTimer; | |
private readonly float _dequeueDelay; | |
private float _emptyTimer; | |
private readonly float _emptyDelay; | |
private readonly Queue<string> _messageQueue = new Queue<string>(); |
This file contains 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
using System.Collections.Generic; | |
using System.Diagnostics; | |
namespace Utils | |
{ | |
public interface TimedQueueCallback | |
{ | |
void OnMessage(string message); | |
void OnEmpty(); | |
} |
This file contains 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 ShowMessages : MonoBehaviour, TimedQueueCallback | |
{ | |
[SerializeField] | |
private Text _message; | |
private TimedQueue queue; | |
void Start() | |
{ | |
queue = new TimedQueue(this); |
This file contains 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
using System.Collections.Generic; | |
using UnityEngine; | |
using UnityEngine.UI; | |
namespace Utils | |
{ | |
public class ShowMessages : MonoBehaviour | |
{ | |
[SerializeField] |
This file contains 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
namespace Utils | |
{ | |
public class ShowMessages : MonoBehaviour | |
{ | |
[SerializeField] | |
private Text _message; | |
private TimedQueue<string> queue; |
OlderNewer