![]() |
Interfaces?
Are there interfaces in GS2? I say this because i have been working with java a lot lately and i was wondering if there is like interfaces or something similar? Would someone care to explain if there is. :D
|
Quote:
I know you know this, for the benefit of those who don't. In GS2, this would be rather pointless, as you can call whatever you want on anything you want. For example, I can call doSomething() to the Control NPC, even if it doesn't have this function. I'll get an error in RC, but I can still call it. This defeats the whole purpose of interfaces since you can call no matter what. If you're trying to replicate this, perhaps have a class like this: Code of script interface_bird PHP Code:
PHP Code:
PHP Code:
Like I said, this is pointless in GS2 as GS2 won't die like Java will; it will keep going and report an error. Java generally won't even compile this code to start with. So no, there is no interface functionality in GS2 to my knowledge, and there is no reason to need it. Hope this helps! |
Graal doesn't need Interfaces.
C# > Java |
Quote:
|
You don't need function prototypes in GS2 so of course you wouldn't have something like that.
|
| All times are GMT +2. The time now is 02:57 AM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.