Added Boost! if stalled out.
Snowboard » Devlog
// This is how I added a 'Boost' in case the player stops too soon and needs to finish:
// In Unity PlayerController.cs:
void Start()
{
InvokeRepeating("Stalled", 5, 1); // The actual timer function.
}
// -------------------------
void Stalled()
{
timer--;
bBoost = true;
}
Update()
{
if (bBoost) // boost. Do a boost if the snowboarder is stalled (stuck) for more than 5 seconds.
{
surfaceEffector2D.speed = speed + 10f; // The Boost!
dustParticles.Play();
if (surfaceEffector2D.speed < 5f)
{
dustParticles.Stop();
}
bBoost = false;
}
Files
snowboard1p6.zip Play in browser
Jan 13, 2023
Snowboard
Do flips and stop before flying off the cliff!
More posts
- Added two input methods: mouse and cursor keysJan 22, 2023
- Ver 1.5 - Added a second slope & scoringJan 12, 2023
- Ver 1.3 - Use of mouse clicks instead for inputJan 11, 2023
- Snowboard devlog, Stardate: 100.2.211.229Jan 11, 2023
Leave a comment
Log in with itch.io to leave a comment.