Sha256: ce3d395ec074ee9490aa9eac4547a6af2d3d67daa86822907d16aa9cf72891bd

Contents?: true

Size: 464 Bytes

Versions: 2

Compression:

Stored size: 464 Bytes

Contents

module Joybox
  module Common

    module Screen

      module_function

      def self.width
        Joybox.director.winSize.width
      end

      def self.half_width
        Joybox.director.winSize.width / 2
      end

      def self.height
        Joybox.director.winSize.height
      end

      def self.half_height
        Joybox.director.winSize.height / 2
      end

      def center
        [half_width, half_height].to_point
      end

    end

  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
joybox-1.1.1 motion/joybox/common/screen.rb
joybox-1.1.0 motion/joybox/common/screen.rb