Cauldron2D.GameMaker.Room.View (Cauldron2D.GameMaker v0.2.1)

Copy Markdown View Source

A room's view: the rectangle view {x, y, width, height} of the room shown in the rectangle port {x, y, width, height} of the window. With follow set to an object index, the view keeps that object's instance at least border {x, y} pixels from its edges, moving at most speed {x, y} pixels a step, -1 for no limit.

Summary

Functions

The view at at.

Types

rectangle()

@type rectangle() :: {integer(), integer(), integer(), integer()}

t()

@type t() :: %Cauldron2D.GameMaker.Room.View{
  border: {integer(), integer()},
  enabled: boolean(),
  follow: non_neg_integer() | nil,
  port: rectangle(),
  speed: {integer(), integer()},
  view: rectangle()
}

Functions

read(data, at)

@spec read(binary(), non_neg_integer()) :: t()

The view at at.