Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

The music is very great.The idea of turning tetris in to a uncontrollable game really fits the theme. the only problem I had has that running felt like running on ice. but overall it was a really great game. If you like you could check out my game on https://itch.io/jam/gmtk-2020/rate/698144


TRY PUTTING THIS IN TO THE CHARACTER CONTROLLER

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class player : MonoBehaviour
{

    private Rigidbody2D rigidbody;

    public float stopspeed = 1f;

    float timeLeftToStopRunning;

    float HorizontalInput;

    private void Awake()
    {
        rigidbody = GetComponent<Rigidbody2D>();

        timeLeftToStopRunning = stopspeed;

    }

    void Update()
    {
        HorizontalInput = Input.GetAxisRaw("Horizontal");

    }

    private void FixedUpdate()
    {

        if (HorizontalInput == 0f)
        {

            if (timeLeftToStopRunning > 0f)
            {

                timeLeftToStopRunning -= Time.deltaTime;

           }

            if (rigidbody.velocity.x > timeLeftToStopRunning || rigidbody.velocity.x < timeLeftToStopRunning * -1)
            {

                rigidbody.velocity = new Vector2(timeLeftToStopRunning * transform.right.x, rigidbody.velocity.y);

            }

        }
        else
        {

            timeLeftToStopRunning = stopspeed;

        }