# Path: procgame/config.py
# def value_for_key_path(keypath, default=None):
# def load():


from procgame import config
from layers import *
import transitions
import sys
        self.move_target_x = target_x
        self.move_target_y = target_y
        self.finished = False
        self.composite_op = composite_op
        self.loop = loop
    
    
    def next_frame(self):
        if not self.finished:
            #print self.object_layer.frames[0].width, self.object_layer.frames[0].height
            self.step_number+=1
            if self.step_number < self.lengthInFrames:
                new_x = int((self.move_target_x - self.start_x )* self.step_number/self.lengthInFrames) + self.start_x
                new_y = int((self.move_target_y - self.start_y )* self.step_number/self.lengthInFrames) + self.start_y
                self.set_target_position(new_x,new_y)
            elif self.step_number == self.lengthInFrames:
                self.set_target_position(self.move_target_x, self.move_target_y)
                self.finished = True
                if self.loop:
                    self.finished = False
                    self.step_number = 1
                if self.callback != None:
                    if self.param != None:
                        self.callback(self.param)
                    else:
                        self.callback()
        return self.object_layer.next_frame()
        
    def reset(self):
        self.step_number = 0

# Path: procgame/config.py
# def value_for_key_path(keypath, default=None):
# def load():


# Path: procgame/dmd/transitionlayer.py
from procgame import config
from layers import *
import transitions
import sys

        self.move_target_x = target_x
        self.move_target_y = target_y
        self.finished = False
        self.composite_op = composite_op
        self.loop = loop
    
    
    def next_frame(self):
        if not self.finished:
            #print self.object_layer.frames[0].width, self.object_layer.frames[0].height
            self.step_number+=1
            if self.step_number < self.lengthInFrames:
                new_x = int((self.move_target_x - self.start_x )* self.step_number/self.lengthInFrames) + self.start_x
                new_y = int((self.move_target_y - self.start_y )* self.step_number/self.lengthInFrames) + self.start_y
                self.set_target_position(new_x,new_y)
            elif self.step_number == self.lengthInFrames:
                self.set_target_position(self.move_target_x, self.move_target_y)
                self.finished = True
                if self.loop:
                    self.finished = False
                    self.step_number = 1
                if self.callback != None:
                    if self.param != None:
                        self.callback(self.param)
                    else:
                        self.callback()
        return self.object_layer.next_frame()
        
    def reset(self):
        self.step_number = 0

        self.finished = False