Author Topic: Add new properties to conveyor  (Read 544 times)

qqplayer

  • Sr. Member
  • ****
  • Posts: 245
    • View Profile
Add new properties to conveyor
« on: March 11, 2017, 10:06:30 AM »
I found this code inside the coveryour module:

Code: [Select]
class SimpleArtStrip extends Conveyor
{
m_x=0; m_y=0; m_width=0; m_height=0; m_x_span=0; m_y_span=0;

constructor( artwork_label, num_objs, x, y, width, height, pad=0 )
{
base.constructor();
local my_list = [];
for ( local i=0; i<num_objs; i++ )
my_list.push( SimpleArtStripSlot(this,artwork_label) );
set_slots( my_list );

m_x=x+pad/2; m_y=y+pad/2;
if ( width < height )
{
m_x_span=0;
m_y_span=height;
m_width=width-pad;
m_height=height/m_objs.len()-pad;
}
else
{
m_x_span=width;
m_y_span=0;
m_width=width/m_objs.len()-pad;
m_height=height-pad;
}

reset_progress();
}
};

Can I add new properties like pin_x or skew_x?
Can anyone make me a little example on how to do this?
Thanks.

PD:

Want to do something like this



http://s406.photobucket.com/user/sismo99/media/Captura03.jpg.html
« Last Edit: March 11, 2017, 11:06:13 AM by qqplayer »