Skip to content

Instantly share code, notes, and snippets.

View ShuraProgerMain's full-sized avatar
:shipit:
I don't speak english

Shura Proger ShuraProgerMain

:shipit:
I don't speak english
View GitHub Profile
@ShuraProgerMain
ShuraProgerMain / CalculateBlockPlacement.cs
Created August 10, 2025 10:36
Code for block placement in grid
public readonly struct CellPosGrade
{
public readonly int X;
public readonly int Y;
public readonly int Grade;
public CellPosGrade(int x, int y, int grade)
{
X = x;
Y = y;
Grade = grade;
@ShuraProgerMain
ShuraProgerMain / CellIndexSearcher.cs
Created August 10, 2025 10:31
Search index in grid under mouse
using UnityEngine;
using UnityEngine.UI;
public class CellIndexSearcher
{
private readonly RectTransform _cellsContainer;
private readonly float _cellW;
private readonly float _cellH;
private readonly float _spaceX;
@ShuraProgerMain
ShuraProgerMain / Rombus.shader
Created October 11, 2023 12:49
Rombus.shader
Shader "Custom/RhombusSprite" {
Properties {
_MainTex ("Texture", 2D) = "white" {}
_InternalLineSize ("Value", Range(0, 1)) = 1
_ExternalLineSize ("Value", Range(0, 1)) = 1
_Color ("Color", Color) = (1, 1, 1, 0)
}
SubShader {
Tags { "Queue"="Transparent" }
@ShuraProgerMain
ShuraProgerMain / GraduateHelper.cs
Last active October 9, 2023 20:54
GraduateHelper
using System;
using System.Threading.Tasks;
using UnityEngine;
namespace Helpers
{
public static class GraduateHelper
{
public static async void Graduate(Action<float> action, float duration, bool reverse = false)
{
@ShuraProgerMain
ShuraProgerMain / UserScore.cs
Created December 29, 2022 02:02
UserScore.cs
using System.Collections;
using System.Text.Json;
namespace NamePairGenerate;
public struct GenerateConfig
{
public string JsonDataPath { get; }
public int NeedUsersCount { get; }
public int MinScoreValue { get; }