Skip to content
View Craganoo's full-sized avatar

Block or report Craganoo

Block user

Prevent this user from interacting with your repositories and sending you notifications. Learn more about blocking users.

You must be logged in to block users.

Please don't include any personal information such as legal names or email addresses. Maximum 100 characters, markdown supported. This note will be visible to only you.
Report abuse

Contact GitHub support about this user’s behavior. Learn more about reporting abuse.

Report abuse
Craganoo/README.md

public class PowerUp : MonoBehaviour { public float speedBoost = 2f; public float duration = 5f;

private void OnTriggerEnter2D(Collider2D other)
{
 
  if (other.CompareTag("Player"))
    {
        StartCoroutine(BoostSpeed(other.GetComponent<PlayerController>()));
        Destroy(gameObject);
    }
}

private IEnumerator BoostSpeed(PlayerController player)
{
    player.speed *= speedBoost;
    yield return new WaitForSeconds(duration);
    player.speed /= speedBoost;
}

}

Popular repositories Loading

  1. Luckkysk Luckkysk Public

  2. Craganoo Craganoo Public

    Config files for my GitHub profile.

  3. CopilotForXcode CopilotForXcode Public

    Forked from github/CopilotForXcode

    Xcode extension for GitHub Copilot

    Swift