Class: Touch::Position

Inherits:
Object show all
Defined in:
docs/0_Dependencies.rb

Overview

Class representing a touch position

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(x, y) ⇒ Position

Create a new Position

Parameters:

  • x (Integer) —

    x position of the touch

  • y (Integer) —

    y position of the touch



3339
3340
# File 'docs/0_Dependencies.rb', line 3339

def initialize(x, y)
end

Instance Attribute Details

#x ⇒ Integer (readonly)

Get the touch x position

Returns:

  • (Integer)


3332
3333
3334
# File 'docs/0_Dependencies.rb', line 3332

def x
  @x
end

#y ⇒ Integer (readonly)

Get the touch y position

Returns:

  • (Integer)


3335
3336
3337
# File 'docs/0_Dependencies.rb', line 3335

def y
  @y
end