This file contains hidden or 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
using System.Collections.Generic; | |
using UnityEngine; | |
using UnityEditor; | |
using System.Collections; | |
using UMA; | |
public class MaterialValuesCopier : ScriptableObject | |
{ | |
[MenuItem("HDmyUMA/ SELECT A FOLDER THAT CONTAINS (OR WHOSE SUBFOLDERs CONTAINS) ALL THE OverlayDataAssets TO CONVERT")] |
This file contains hidden or 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
#!/bin/bash | |
export EMSCRIPTEN_ROOT=[path containing em++, emsdk-portable/emscripten/*] | |
export ANDROID_HOME=[path to android sdk, usually /home/*/Android/Sdk] | |
export ANDROID_NDK_ROOT=[path to android ndk, likely $ANDROID_HOME/ndk-bundle] | |
X11_DEBUG=false | |
X11_RELEASE=false | |
WIN_DEBUG=false | |
WIN_RELEASE=false |
This file contains hidden or 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
## --> rotating circle from characters | |
# --> from http://stackoverflow.com/questions/10470139/creating-rotating-circle-using-characters-in-shell-script | |
while sleep 1; do | |
i=$((++i%4 + 2)); | |
printf '\b|/-\' | cut -b 1,$i | tr -d '\n'; | |
done |
This file contains hidden or 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
extends Area2D | |
export var speed = 400 | |
var screensize | |
var velocity = Vector2() | |
func _ready(): | |
This file contains hidden or 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
extends KinematicBody2D | |
onready var sprite = get_node("sprite") | |
const UP = Vector2(0, -1) | |
const GRAVITY = 20 | |
const ACCELARATION = 50 | |
const MAX_SPEED = 400 | |
const JUMP_HEIGHT = -500 | |
const FRICTION = 0.1 |
This file contains hidden or 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
To get that ParallaxBackground working: | |
1. Create a ParallaxBackground node. (It doesn't need to be a child of the Camera2D node, but making it a child of the Camera2D node won't break it either) | |
2. Create a ParallaxLayer node as a child of the ParallaxBackground. | |
3. Add your sprite as a child of the ParallaxLayer node and make sure Centered is off. | |
4. Go back to the ParallaxLayer node. | |
5. Under Motion, set Mirroring to the size of your sprite (in the case of the Sky sprite, 640x640). | |
6. Under Motion, fiddle with the Scale setting. This is how fast that ParallaxLayer will move in relation to the camera. I found (0.1, 0.1) to be a good starting point for something like a sky. | |
7. Run your game, and you should have a background that infinitely loops and also has a parallax effect. |
This file contains hidden or 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
# Ref : https://www.reddit.com/r/godot/comments/7bi5uf/generating_a_scene_tree_dynamically/ | |
# Create a root Node and name is DynamicNodeGraph | |
extends Node | |
var RootNode | |
var SomeGraphEdit | |
var SomePopupMenu | |
var SomePopupMenuVisible = false | |
var RMBPressed = false |
This file contains hidden or 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
# Create 2 scenes 0.tscn and 1.tscn | |
# Add a Node and call it main | |
# Add script as below to main | |
extends Node | |
var scenes = [0,1] | |
func _ready(): | |
# randomize() |
This file contains hidden or 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
license: mit |
This file contains hidden or 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
license: mit |
NewerOlder