Exemplo n.º 1
0
        public CActor()
        {
            onCreate += new createHandler(create);
            onDestroy += new destroyHandler(destroy);
            onKeyDown += new keyDownHandler(keyDown);
            onKeyRelease += new keyReleaseHandler(keyRelease);
            onFrame += new frameHandler(frame);
            onDraw += new drawHandler(draw);
            onAnimationEnd += new animationEndHandler(animationEnd);

            _name = name;
            _collidables = new List<Type>();

            try
            {
                _addCollidables();
            }
            catch (NotImplementedException)
            { ;}

            _position = position;

            try
            {
                onCreate(this);
            }
            catch (NotImplementedException)
            { }

            _registerUserEvents();
            _initializeResources();
        }
Exemplo n.º 2
0
        public CActor()

        {
            onCreate       += new createHandler(create);
            onDestroy      += new destroyHandler(destroy);
            onKeyDown      += new keyDownHandler(keyDown);
            onKeyRelease   += new keyReleaseHandler(keyRelease);
            onFrame        += new frameHandler(frame);
            onDraw         += new drawHandler(draw);
            onAnimationEnd += new animationEndHandler(animationEnd);
            onCollide      += new collideHandler(collide);
            onMouseClick   += new mouseLeftClickHandler(mouseClick);

            _name        = name;
            _collidables = new List <Type>();

            try
            {
                _addCollidables();
            }
            catch (NotImplementedException)
            {; }

            _position = position;

            try
            {
                onCreate(this);
            }
            catch (NotImplementedException)
            { }

            _registerUserEvents();
            _initializeResources();
        }