Skip to content

Instantly share code, notes, and snippets.

View starry-abyss's full-sized avatar

Igor starry-abyss

View GitHub Profile
@starry-abyss
starry-abyss / fancy_debug_draw.hx
Created May 16, 2016 20:43
Based on old forked version of HaxeFlixel (can be rewritten for official one), for future use :-)
override function drawDebugBoundingBox(gfx: Graphics, rect:FlxRect, allowCollisions:Int)
{
var drawX = rect.x;// + offset;
var drawY = rect.y;// + offset;
var offset = 2;
var offset2 = 2;
/*var offset2x = 0;
var offset2y = 0;*/
@starry-abyss
starry-abyss / quick_debugger_windows.hx
Created May 21, 2016 20:23
A cut from my project for making debug tracker windows more interactive
// objectTrackerWindows is declared as Map<BaseObject, Window>
// BaseObject is my base class for objects, you can replace it with FlxSprite
for (object in objectTrackerWindows.keys())
{
var window = objectTrackerWindows.get(object);
if (!object.alive)
{
window.close();
objectTrackerWindows.remove(object);
package;
import flixel.FlxG;
import flixel.system.scaleModes.BaseScaleMode;
class MedvedScaleMode extends BaseScaleMode
{
/*private var fixedWidth:Bool = false;
private var fixedHeight:Bool = false;*/
title Two and a Half
author scorched
homepage igorsgames.itch.io
color_palette 2
(debug)
background_color black
text_color lightgrey
key_repeat_interval 0.3
@starry-abyss
starry-abyss / readme.txt
Created May 10, 2018 22:42
PuzzleScript Game
Play this game by pasting the script in http://www.puzzlescript.net/editor.html
@starry-abyss
starry-abyss / readme.txt
Last active August 30, 2019 06:48
Jailbreak (PuzzleScript Script)
Play this game by pasting the script in http://www.puzzlescript.net/editor.html
@starry-abyss
starry-abyss / ChangeLightScript.cs
Created June 9, 2016 09:25
Storing ambient reflection in Unity 5 for runtime switching
using UnityEngine;
using System.Collections;
using UnityEngine.Rendering;
public class ChangeLightScript : MonoBehaviour {
public Light sceneLight;
public Color fogColor;
public Cubemap nightSkyReflection;
SphericalHarmonicsL2 ambientProbeNight;
@starry-abyss
starry-abyss / gist:0ca464206b560080b3812188879ce6cb
Created January 7, 2024 21:02
Script for simple playing of some sounds (tested in Godot 3.5)
var audioplayers = []
var audioPlayerHacking
var randomPitch = {}
var volume = {}
func play(soundName):
var audioplayer = null
var index = -1
for i in range(audioplayers.size()):