Object/Class

io.scalajs.dom.html.phaser.utils

Utils

Related Docs: class Utils | package utils

Permalink

object Utils extends Object

Phaser.Utils Singleton

Annotations
@native()
Linear Supertypes
Object, Any, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Utils
  2. Object
  3. Any
  4. AnyRef
  5. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. def chanceRoll(chance: JsNumber): Boolean

    Permalink

    Generate a random bool result based on the chance value.

    Generate a random bool result based on the chance value. Returns true or false based on the chance value (default 50%). For example if you wanted a player to have a 30% chance of getting a bonus, call chanceRoll(30) - true means the chance passed, - false means it failed.

    chance

    The chance of receiving the value. A number between 0 and 100 (effectively 0% to 100%).

    returns

    True if the roll passed, or false otherwise.

  6. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  7. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  8. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  9. def extend[A](deep: Boolean, target: Any): A

    Permalink

    This is a slightly modified version of http://api.jquery.com/jQuery.extend/

    This is a slightly modified version of http://api.jquery.com/jQuery.extend/

    deep

    Perform a deep copy?

    target

    The target object to copy to.

    returns

    The extended object.

  10. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  11. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  12. def getProperty(obj: Any, prop: String): Any

    Permalink

    Gets an objects property by string.

    Gets an objects property by string.

    obj

    The object to traverse.

    prop

    The property whose value will be returned.

    returns

    the value of the property or null if property isn"t found.

  13. def hasOwnProperty(v: String): Boolean

    Permalink
    Definition Classes
    Object
  14. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  15. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  16. def isPlainObject(obj: Any): Boolean

    Permalink

    This is a slightly modified version of jQuery.isPlainObject.

    This is a slightly modified version of jQuery.isPlainObject. A plain object is an object whose internal class property is [object Object].

    obj

    The object to inspect.

    returns

    true if the object is plain, otherwise false.

  17. def isPrototypeOf(v: Object): Boolean

    Permalink
    Definition Classes
    Object
  18. def mixin(from: Any, to: Any): Any

    Permalink

    Mixes the source object into the destination object, returning the newly modified destination object.

    Mixes the source object into the destination object, returning the newly modified destination object.

    from

    The object to copy (the source object).

    to

    The object to copy to (the destination object).

    returns

    The modified destination object.

  19. def mixinPrototype(target: Any, mixin: Any, replace: Boolean = js.native): Any

    Permalink

    Mixes in an existing mixin object with the target.

    Mixes in an existing mixin object with the target. Values in the mixin that have either get or set functions are created as properties via defineProperty except if they also define a clone method - if a clone method is defined that is called instead and the result is assigned directly.

    target

    The target object to receive the new functions.

    mixin

    The object to copy the functions from.

    replace

    If the target object already has a matching function should it be overwritten or not?

  20. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  21. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  22. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  23. def pad(str: |[Any, String], len: Int = js.native, pad: String = js.native, dir: Int = js.native): String

    Permalink

    str

    The target string. toString() will be called on the string, which means you can also pass in common data types like numbers.

    len

    The number of characters to be added.

    pad

    The string to pad it out with (defaults to a space).

    dir

    The direction dir = 1 (left), 2 (right), 3 (both).

    returns

    The padded string.

    Example:
    1. pad("bob", 6, "-", 2)
  24. def parseDimension(size: |[JsNumber, String], dimension: JsNumber): Int

    Permalink

    Get a unit dimension from a string.

    Get a unit dimension from a string.

    size

    The size to parse.

    dimension

    The window dimension to check.

    returns

    The parsed dimension.

  25. def propertyIsEnumerable(v: String): Boolean

    Permalink
    Definition Classes
    Object
  26. def randomChoice(choice1: Any, choice2: Any): Any

    Permalink

    Choose between one of two values randomly.

    Choose between one of two values randomly.

    choice1

    the first choice

    choice2

    the second choice

    returns

    The randomly selected choice

  27. def reverseString(string: String): String

    Permalink

    Takes the given string and reverses it, returning the reversed string.

    Takes the given string and reverses it, returning the reversed string. For example if given the string "Atari 520ST" it would return "TS025 iratA".

    string

    The string to be reversed.

    returns

    The reversed string.

  28. def setProperty[T](obj: T, prop: String): T

    Permalink

    Sets an objects property by string.

    Sets an objects property by string.

    obj

    The object to traverse

    prop

    The property whose value will be changed

    returns

    The object on which the property was set.

  29. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  30. def toLocaleString(): String

    Permalink
    Definition Classes
    Object
  31. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  32. def valueOf(): Any

    Permalink
    Definition Classes
    Object
  33. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  34. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  35. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from Object

Inherited from Any

Inherited from AnyRef

Inherited from Any

Ungrouped