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
shader_type canvas_item; | |
/** | |
Maps object texture onto a sphere and applies a spherical normal | |
based on a simulated light. | |
Adapted from | |
https://www.raywenderlich.com/2323-opengl-es-pixel-shaders-tutorial | |
and | |
https://gamedev.stackexchange.com/a/9385 |
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
# A Rigidbody Controller for basic 3D movement | |
extends RigidBody | |
# not sure what to put here to get proper turning | |
var turn_speed = Vector3(1,0,0) | |
# not sure what to put here to get proper movement | |
var movement_speed = Vector3(1,0,0) |
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
# ____________LICENSE____________ | |
# (See license.txt or the *maintained* link included for more details ) | |
# This Source Code Form is subject to the terms of the Mozilla Public | |
# License, v. 2.0. If a copy of the MPL was not distributed with this | |
# file, You can obtain one at http://mozilla.org/MPL/2.0/. | |
# ______________________________ | |
# Please credit "Abe Noll(forgotten-king)", the writer of this script and implementation. | |
# For what MPL-2.0 covers, I would appreciate if you went the extra mile to include a link in the source | |
# to any of the changes and fixes you made back to this gist, and also to leave a link on |
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
class Explosion(pygame.sprite.Sprite): | |
def __init__(self, center, size): | |
pygame.sprite.Sprite.__init__(self) | |
self.size = size | |
self.image = explosion_anim[self.size][0] | |
self.rect = self.image.get_rect() | |
self.rect.center = center | |
self.frame = 0 # set frame to 0 (frame will increment based on frame rate) | |
self.last_update = pygame.time.get_ticks() # set last_update to gametime in miliseconds (since object initaited) | |
self.frame_rate = 50 |
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
# Available only in the 2.2 legacy branch and posterior versions | |
func _ready(): | |
# The old way: | |
print("HELLO") # Code before the yield | |
# Setting up the yield: | |
var t = Timer.new() # Create a new Timer node | |
t.set_wait_time(5.5) # Set the wait time | |
add_child(t) # Add it to the node tree as the direct child |
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
#!/bin/sh | |
### | |
# SOME COMMANDS WILL NOT WORK ON macOS (Sierra or newer) | |
# For Sierra or newer, see https://github.com/mathiasbynens/dotfiles/blob/master/.macos | |
### | |
# Alot of these configs have been taken from the various places | |
# on the web, most from here | |
# https://github.com/mathiasbynens/dotfiles/blob/5b3c8418ed42d93af2e647dc9d122f25cc034871/.osx |