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
| import random | |
| import time | |
| class Player(): | |
| def __init__(self, name): | |
| self.health = 100 | |
| self.name = name | |
| self.wins = 0 |
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
| --- Stubs for functions that object scripts can define which will then be called by C++ | |
| --- Called once when the object is initialized | |
| function init() end | |
| --- Update loop handler, called once every scriptDelta (defined in *.object) ticks | |
| function main() end | |
| --- Called when the object is interacted with (e.g. by a player) | |
| -- |
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
| _ENV: { | |
| next: function, | |
| assert: function, | |
| object: { | |
| distanceToEntity: function, | |
| playImmediateSound: function, | |
| burstParticleEmitter: function, | |
| animationStateProperty: function, | |
| setFlipped: function, | |
| smash: function, |
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
| --- Stubs for world.* callbacks defined in C++. | |
| -- | |
| -- DO NOT INCLUDE this file in your scripts, it is for documentation purposes only. | |
| -- | |
| world = { | |
| --- Finds all entities in the given region | |
| -- | |
| -- @param center Center of circular region to find entities in, or min | |
| -- position of a rect if radius is a 2-vector | |
| -- |