def mouth_move
return if @mouth_move_duration > 0
return if bitmap[@face_index] == nil
return if bitmap[@face_index].size == 1
@mouth_move_duration = MOUTH_MOVE_DURATION
if @mouth_index == 0 and bitmap[@face_index][1] != nil
@mouth_index = 1
else
loop do
@mouth_index += 1
@mouth_index %= 20 #总共需要几张动嘴动作这里就填几
break if bitmap[@face_index][@mouth_index]
end
end
@pic_sprite.bitmap = bitmap[@face_index][@mouth_index]
end
def mouth_move
return if @mouth_move_duration > 0
return if bitmap[@face_index] == nil
return if bitmap[@face_index].size == 1
@mouth_move_duration = MOUTH_MOVE_DURATION
if @mouth_index == 0 and bitmap[@face_index][1] != nil
@mouth_index = 1
else
loop do
@mouth_index += 1
@mouth_index %= 20 #总共需要几张动嘴动作这里就填几
break if bitmap[@face_index][@mouth_index]
end
end
@pic_sprite.bitmap = bitmap[@face_index][@mouth_index]
end