Game Development Community

Question on packages and namespaces

by Andreas Heldt · in Torque Game Engine · 02/15/2005 (10:11 am) · 2 replies

Hi, I just wondered today if i can override functions declared in a namespace in packages, like this:

package myPackage
{
    function GameConnection::onClientEnterGame(%this)
    {
    }
};

If this works, my biggest question is how to call the package parent's function, would it be like this:?

Parent::GameConnection::onClientEnterGame();

or just:
Parent::onClientEnterGame();

or do I have to provide the %this 'cause of the package?

#1
02/15/2005 (12:43 pm)
Yes you can

and

Parent::onClientEnterGame(%this);
#2
02/18/2005 (9:16 am)
Cool, this really works!! Thanks :)