diff options
author | rubidium <rubidium@openttd.org> | 2014-09-19 20:06:51 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2014-09-19 20:06:51 +0000 |
commit | 79ca66eb673c710432d1f4e51af70730a09a82c8 (patch) | |
tree | 5c26b5456711549c69e6d7c74b6e966072670cb6 /src/3rdparty/squirrel/samples/class.nut | |
parent | bd0cd31d4b4e13dcf99c3b4170069d9eb08a91cf (diff) | |
download | openttd-79ca66eb673c710432d1f4e51af70730a09a82c8.tar.xz |
(svn r26853) -Cleanup [Squirrel]: remove some stuff that we never did and especially never should use
Diffstat (limited to 'src/3rdparty/squirrel/samples/class.nut')
-rw-r--r-- | src/3rdparty/squirrel/samples/class.nut | 49 |
1 files changed, 0 insertions, 49 deletions
diff --git a/src/3rdparty/squirrel/samples/class.nut b/src/3rdparty/squirrel/samples/class.nut deleted file mode 100644 index babe54f0b..000000000 --- a/src/3rdparty/squirrel/samples/class.nut +++ /dev/null @@ -1,49 +0,0 @@ -////////////////////////////////////////////////////////////////////////////////// -////////////////////////////////////////////////////////////////////////////////// -class BaseVector { - constructor(...) - { - if(vargc >= 3) { - x = vargv[0]; - y = vargv[1]; - z = vargv[2]; - } - } - - - x = 0; - y = 0; - z = 0; -} - -class Vector3 extends BaseVector { - function _add(other) - { - if(other instanceof this.getclass()) - return ::Vector3(x+other.x,y+other.y,z+other.z); - else - throw "wrong parameter"; - } - function Print() - { - ::print(x+","+y+","+z+"\n"); - } -} - -local v0 = Vector3(1,2,3) -local v1 = Vector3(11,12,13) -local v2 = v0 + v1; -v2.Print(); - -FakeNamespace <- { - Utils = {} -} - -class FakeNamespace.Utils.SuperClass { - constructor() - { - ::print("FakeNamespace.Utils.SuperClass") - } -} - -local testy = FakeNamespace.Utils.SuperClass(); |