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
function generateWindow( %x, %y, %width, %height ) | |
{ | |
// Values. | |
%width_full = %width + 128; | |
%height_full = %height + 129; | |
%width_shape = %width + 2; | |
%height_shape = %height + 2; | |
// Base. |
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
function HazeLauncher::onMouseMove( %this, %pos ) | |
{ | |
if ( getWord( %pos, 0 ) < getWord( %this.extent, 0 ) && getWord( %pos, 1 ) >= getWord( %this.position, 1 ) ) | |
{ | |
%this.prevMMInside = true; | |
%this.updateStatusAll(); | |
} | |
else if ( %this.prevMMInside ) | |
{ | |
%this.prevMMInside = 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
function updateScreenOffset() | |
{ | |
cancel( $updateScreenOffset ); | |
if ( !isObject( %sc = nameToID( "serverConnection" ) ) ) | |
{ | |
$dofX = 0; | |
$dofY = 0; | |
return; |
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
<html> | |
<head> | |
<script type="text/javascript" src="http://mbostock.github.com/d3/d3.js?1.29.1"></script> | |
<style> | |
* { | |
margin: 0; | |
padding: 0; | |
overflow: hidden; | |
} | |
</style> |
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
function gameConnection::dups( %this, %path ) | |
{ | |
if ( !isObject( %base = %this.player.tempBrick ) && !%base.duplicationBrick ) | |
{ | |
return; | |
} | |
if ( !isObject( %stack = %base.stack ) ) | |
{ | |
return; |
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
function simGroup::createBrickFromJSON( %this, %data, %offset, %plant ) | |
{ | |
if ( %data.hasKey( "position" ) ) | |
{ | |
%position = vectorAdd( %data.get( "position" ), %offset ); | |
} | |
else | |
{ | |
return -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
function save_json_bricks( %path, %set, %data, %offset ) | |
{ | |
if ( !strLen( %offset ) ) | |
{ | |
%offset = "0 0 0"; | |
} | |
if ( !strLen( %data ) ) | |
{ | |
%data = js_object(); |
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
%start = %this.getEyePoint(); | |
%beam = vectorScale( %this.getEyeVector(), 2.5 ); | |
%stop = vectorAdd( %start, %beam ); | |
%ray = containerRayCast( | |
%start, %stop, | |
$TypeMasks::FxBrickObjectType, %this | |
); | |
if ( isObject( firstWord( %ray ) ) ) |
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
function r(){exec("./main.cs");} | |
function swarmFighterVehicle::onAdd( %this, %obj ) | |
{ | |
parent::onAdd( %this, %obj ); | |
SwarmFJetCheck( %obj ); | |
%obj.flyState = 0; | |
%obj.droneTick = %obj.schedule( 50, "droneTick" ); |
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
>>> t = ast.parse(""" | |
... def foo(x, y): | |
... y = -y | |
... | |
... if x == 4: | |
... print 'hi' | |
... else: | |
... print 'bye' | |
... """) | |
>>> print tspy.to_torquescript(t) |
OlderNewer