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 KinematicBody2D | |
export var speed:int = 400 | |
export var health:int = 10 | |
func _physics_process(delta:float)->void: | |
process_inputs(delta) | |
pass | |
func process_inputs(delta)->void: |
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 Game Engine Type Example Explicit | |
# We assume that the type is an int, since 400 has been assigned | |
var my_speed:= 400 |
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 Game Engine Type Example Explicit | |
var my_speed:int = 400 |
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 Game Engine Type Example Explicit | |
var my_speed:int = 400 |
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 Game Engine Variable Example | |
var my_speed = 400 |
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 Constant Variable in the Godot Game Engine | |
const my_speed = 400 |
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
# Kino Rose - NierPixel - https://nierpixel.com/ | |
# Composing Functions | |
def add(num_one:int, num_two:int)->int: | |
return num_one + num_two | |
def multiply(num_one:int, num_two:int)->int: | |
return num_one * num_two | |
# Three Times Five Composed |
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
# Kino Rose - NierPixel - https://nierpixel.com/ | |
# No Return Function | |
def secret_addition(num_one:int, num_two:int)->None: | |
num_one + num_two | |
pass |
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
# Kino Rose - NierPixel - https://nierpixel.com/ | |
# Python Function Example | |
def add(num_one:int, num_two:int)->int: | |
return num_one + num_two |
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
def add(x, y): | |
return x + y | |
# Returns 4 | |
add(2, 2) |