Exemplo n.º 1
0
        public void PostCreate(ActorArgs args)
        {
            obj  = args.m_shape;
            text = args.m_texture;
            pos  = args.m_position;
            size = args.m_size;

            obj.Texture  = text;
            obj.Position = pos;
        }
Exemplo n.º 2
0
        public static T CreateInternalActor <T>(this Game game, ActorArgs args) where T : Actor, new()
        {
            /*Actor actor = new Actor();
             * actor.intr = args.intrect;
             * actor.text = args.texture;
             * actor.pos = args.position;
             * actor.obj = args.shape;*/
            T t = new T();

            t.PostCreate(args);
            game.RegisterActor(t);
            return(t);
        }