Skip to content

Instantly share code, notes, and snippets.

Karl kewp

Block or report user

Report or block kewp

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@kewp
kewp / Movie.java
Created Sep 6, 2018
Kotlin Data Class - Java Equivalent
View Movie.java
// Kotlin: data class Movie( val id: Int, val name: String )
import kotlin.jvm.internal.Intrinsics;
import org.jetbrains.annotations.NotNull;
public final class Movie {
private final int id;
@NotNull
private final String name;
View gist:6c6c67b53669429baad8
package;
import flixel.FlxSprite;
/**
* ...
* @author ...
*/
class Player extends FlxSprite
{
View gist:a151572563eadfbd5314
/**
* Load an image from an embedded graphic file.
*
* @param Graphic The image you want to use.
* @param Animated Whether the Graphic parameter is a single sprite or a row of sprites.
* @param Width Optional, specify the width of your sprite (helps FlxSprite figure out what to do with non-square sprites or sprite sheets).
* @param Height Optional, specify the height of your sprite (helps FlxSprite figure out what to do with non-square sprites or sprite sheets).
* @param Unique Optional, whether the graphic should be a unique instance in the graphics cache. Default is false.
* @param Key Optional, set this parameter if you're loading BitmapData.
* @return This FlxSprite instance (nice for chaining stuff together, if you're into that).
View gist:db1ad94294d4c9c4dbd0
public function new(X:Float = 0, Y:Float = 0, ?SimpleGraphic:Dynamic)
{
super(X, Y);
if (SimpleGraphic != null)
{
loadGraphic(SimpleGraphic);
}
}
You can’t perform that action at this time.