Wednesday July 29, 2015
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
# Traffic Light | |
# By the Tutorial Doctor | |
# THE CLASS | |
#-------------------------------------------------- | |
class TrafficLight(): | |
GREEN = [1,0,0] | |
YELLOW = [0,1,0] | |
RED = [0,0,1] | |
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
# By the Tutorial Doctor | |
# Mon Aug 24 19:45:19 EDT 2015 | |
# This is the start of a simple custom command line python script | |
import random | |
import datetime | |
import editor | |
import os | |
#------------------------------------------------------------------------------ |
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
-- LUA SYNTAX (WIP) | |
-- PRINTING | |
-- Print a string | |
print("Hello World") | |
-- Print multiple strings | |
print("Hello","World") | |
-- Join/Concatenate two strings (gives errors if not strings) |
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
# WIP | |
# By the Tutorial Doctor | |
# CLASSES | |
#------------------------------------------------------------ | |
class Element: | |
count = 0 | |
def __init__(self): | |
self.tag = 'p' | |
self.id = "elementID" | |
self.html = "<%s id=\"%s\"></%s>"%(self.id,self.tag,self.tag) |
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
extends Node2D | |
# Godot Script Syntax | |
# By the Tutorial Doctor | |
# Fri Oct 2 23:58:22 EDT 2015 | |
#----------------------------------------------------------- | |
# VARIABLES | DATA TYPES | | |
#----------------------------------------------------------- | |
# String | |
var name = "Tutorial Dcotor" |
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
#----------------------------- | |
# Godot Code Snippets (2D) | | |
# By the Tutorial Doctor | | |
# Fri Sep 18 13:14:07 EDT 2015| | |
#----------------------------- | |
# MAKE AN OBJECT FOLLOW THE MOUSE | |
func followMouse(x): | |
var mouse_position = get_viewport().get_mouse_pos() |
A list of readings I found useful when learning Python.
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
# coding: utf-8 | |
# Place this file in any directory and run it. | |
# An HTML, CSS, Javascript, and Python file will be generated in the directory. | |
# Double click the html file to test it in a browser. | |
# That's it (Edit as you will) | |
WRITE= 'w' | |
READ= 'r' |
OlderNewer