Skip to content

Instantly share code, notes, and snippets.

View BigETI's full-sized avatar
🤣
When GitHub stories?

Ethem Kurt BigETI

🤣
When GitHub stories?
View GitHub Profile
/// <summary>
/// Draw line
/// </summary>
/// <param name="from">From in texture coordinates</param>
/// <param name="to">To in texture coordinates</param>
/// <param name="brushSize">Brush size</param>
/// <param name="color">Color</param>
/// <param name="isForeignDrawCommand">Is foreign draw command</param>
public void DrawLine(Vector2 from, Vector2 to, float brushSize, Color32 color, bool isForeignDrawCommand)
{
@BigETI
BigETI / Plane.cs
Created August 27, 2020 18:56
An class that allows generating plane meshes.
using System;
using System.Threading.Tasks;
using UnityEngine;
/// <summary>
/// Plane class
/// </summary>
public static class Plane
{
/// <summary>
@BigETI
BigETI / keys.pwn
Created October 27, 2020 18:25
Helper function to check key states in PAWN
bool:AreKeysDown(keys, oldKeys, newKeys)
{
return ((oldKeys & keys) != keys) && ((newKeys & keys) == keys);
}
bool:AreKeysUp(keys, oldKeys, newKeys)
{
return ((oldKeys & keys) == keys) && ((newKeys & keys) != keys)
}
@BigETI
BigETI / create_empty_unity_package.cpp
Created October 28, 2020 17:31
Creates an empty Unity project. Loads very quickly!
#include <iostream>
#include <filesystem>
#include <fstream>
static void WriteToFile(const std::filesystem::path& path, const std::string& contents)
{
std::ofstream ofs(path.string());
if (ofs.is_open())
{
ofs << contents;