This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// Keyboard.swift | |
// | |
// Created by Bojan Percevic on 5/21/15. | |
// Copyright (c) 2015 Bojan Percevic. All rights reserved. | |
// | |
import AppKit | |
enum Key: CUnsignedShort { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// NSImage+pixelData.swift | |
// | |
// Created by Figgleforth on 5/21/15. | |
// Copyright (c) 2015 Bojan Percevic. All rights reserved. | |
// | |
import AppKit | |
extension NSImage { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// UIImage+pixelData.swift | |
// | |
// Created by Bojan Percevic on 5/25/15. | |
// Copyright (c) 2015. All rights reserved. | |
// | |
import Foundation | |
extension UIImage { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Keypathable | |
## Operators | |
#### | |
# Non mutating operator | |
def >(keypath) | |
if self.is_a?(Array) || self.is_a?(ActiveRecord::Associations::CollectionProxy) | |
return self.values_for_keypath(keypath) | |
else |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Written by: Lucas Antunes (aka ItsaMeTuni), [email protected] | |
In: 2/15/2018 | |
The only thing that you cannot do with this script is sell it by itself without substantially modifying it. | |
*/ | |
using System; | |
using UnityEngine; | |
#if UNITY_EDITOR |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Based on https://gamedev.stackexchange.com/questions/182534/comparing-analog-stick-movements-to-predefined-flick-shapes | |
extends Node2D | |
signal gesture_began(recognizer, gesture) | |
signal gesture_ended(recognizer, gesture) | |
signal gesture_recognized(recognizer, gesture) | |
export(bool) var draw_gizmos = true | |
export(int) var gizmo_line_resolution = 100 | |
export(float) var gizmo_analog_diagram_line_width = 2.0 |