|
Nostalgia
2.1.5
|
タイルのデータ。 More...
Public Types | |
| enum | Type { Normal, AutoFloorVX, AutoFloorWolf } |
| Tileのタイプ More... | |
Public Member Functions | |
| Object | GetTileComponentObjectFromIndex (int index) |
| indexからTileComponentのObjectを返す。 More... | |
| TileComponent | GetTileComponentFromIndex (int index) |
| indexからTileComponentを返す。 More... | |
| Vector2 | IndexToPos (int index, int x, int y, Point2 tilePos) |
| パーツのインデックスからテクスチャ座標を取得。 More... | |
| void | SetTileCollider (System.Type classType) |
| TileColliderを設定する More... | |
| float | GetPartsWidth () |
| パーツの横幅を取得。 More... | |
| TileComponent | AddComponent (System.Type type) |
| TileComponentを追加する。 More... | |
| T | AddComponent< T > () |
| TileにTileComponentを追加する。 More... | |
| TileComponent | GetComponent (System.Type type) |
| TileComponentを取得する。 More... | |
| T | GetComponent< T > () |
| TileComponentを取得する。 More... | |
| TileComponent[] | GetComponents (System.Type type) |
| TileComponentの配列を取得する。 More... | |
| T[] | GetComponents< T > () |
| TileComponentの配列を取得する。 More... | |
| void | GetComponents (System.Type type, List< TileComponent > results) |
| TileComponentの配列を取得する。 More... | |
| void | GetComponents< T > (List< T > results) |
| TileComponentの配列を取得する。 More... | |
| void | MoveComponent (int from, int to) |
| TileComponentの順番を移動する。 More... | |
| void | RemoveComponent (TileComponent component) |
| TileComponentを削除する。 More... | |
| bool | IsCombinationTile (Tile tile) |
| 隣り合うTileが結合するかを判定する。 More... | |
| void | Changed () |
Public Attributes | |
| Type | type |
| Tileのタイプ More... | |
| Vector2 | position |
| テクスチャ上の左上座標(ピクセル) More... | |
| int | size |
| 1タイルの幅(ピクセル) More... | |
| int | width = 1 |
| 通常タイルの横幅 More... | |
| int | height = 1 |
| 通常タイルの縦幅 More... | |
| float | uvShiftInside = 0.01f |
| UVをタイルの内側にどれくらいずらすかのテクセル値。 More... | |
| int | animation = 1 |
| コマアニメするフレーム数。 More... | |
| float | animationFrameRate = 10.0f |
| アニメーションのフレームレート。 More... | |
| Color | color = Color.white |
| タイルの色 More... | |
| string | combinationGroupName |
| 結合グループ名 More... | |
| CombinationSideFlags | combinationSideFlags = CombinationSideFlags.All |
| 各辺の接続を制御。 More... | |
Properties | |
| TileSet | tileSet [get] |
| TileSet More... | |
| TileColliderBase | tileCollider [get] |
| TileのCollider。 More... | |
| Object | tileColliderObj [get] |
| TileColliderのObjectを返す。 More... | |
| bool | collider [get] |
| Colliderの有無。 More... | |
| PhysicsMaterial2D | physicsMaterial [get] |
| Colliderに設定するPhysicsMaterial2D。 More... | |
| bool | isTrigger [get] |
| Colliderに設定するIs Trigger。 More... | |
| int | tileComponentCount [get] |
| TileComponentの数を返す More... | |
タイルのデータ。
|
strong |
| TileComponent AddComponent | ( | System.Type | type | ) |
TileComponentを追加する。
| type | 追加するクラスのType。 |
| T AddComponent< T > | ( | ) |
TileにTileComponentを追加する。
| T | 追加するTileComponentのクラス。 |
| T | : | TileComponent |
| void Changed | ( | ) |
| TileComponent GetComponent | ( | System.Type | type | ) |
TileComponentを取得する。
無かった場合はnullを返す。
| type | 取得したいクラスのType。 |
| T GetComponent< T > | ( | ) |
TileComponentを取得する。
無かった場合はnullを返す。
| T | 取得したいTileComponentのクラス。 |
| T | : | class |
| TileComponent [] GetComponents | ( | System.Type | type | ) |
TileComponentの配列を取得する。
| type | 取得したいクラスのType。 |
| void GetComponents | ( | System.Type | type, |
| List< TileComponent > | results | ||
| ) |
TileComponentの配列を取得する。
| type | 取得したいクラスのType。 |
| results | 結果を返すList。 |
| T [] GetComponents< T > | ( | ) |
TileComponentの配列を取得する。
| T | 取得したいTileComponentのクラス。 |
| T | : | class |
| void GetComponents< T > | ( | List< T > | results | ) |
TileComponentの配列を取得する。
| T | 取得したいTileComponentのクラス。 |
| results | 結果を返すList。 |
| T | : | class |
| float GetPartsWidth | ( | ) |
パーツの横幅を取得。
| TileComponent GetTileComponentFromIndex | ( | int | index | ) |
indexからTileComponentを返す。
| Object GetTileComponentObjectFromIndex | ( | int | index | ) |
indexからTileComponentのObjectを返す。
| Vector2 IndexToPos | ( | int | index, |
| int | x, | ||
| int | y, | ||
| Point2 | tilePos | ||
| ) |
パーツのインデックスからテクスチャ座標を取得。
| index | パーツのインデックス。 |
| x | X座標(0~1)。 |
| y | Y座標(0~1)。 |
| tilePos | Tileの位置 |
| bool IsCombinationTile | ( | Tile | tile | ) |
隣り合うTileが結合するかを判定する。
| tile | 隣のTile |
| void MoveComponent | ( | int | from, |
| int | to | ||
| ) |
TileComponentの順番を移動する。
| from | 移動元のインデックス。 |
| to | 移動先のインデックス |
| void RemoveComponent | ( | TileComponent | component | ) |
TileComponentを削除する。
| component | 削除するTileComponent。 |
| void SetTileCollider | ( | System.Type | classType | ) |
TileColliderを設定する
| classType | TileColliderのType |
| int animation = 1 |
コマアニメするフレーム数。
アニメの画像は、Nostalgia.Tile.positionで指定した座標から右に並べておく必要があります。
| float animationFrameRate = 10.0f |
アニメーションのフレームレート。
負数を指定すると逆再生します。
| Color color = Color.white |
タイルの色
| string combinationGroupName |
結合グループ名
同じcombinationGroupNameのタイルが隣り合った場合は結合します。combinationGroupNameが空の場合は同じタイル以外とは結合しません。
| CombinationSideFlags combinationSideFlags = CombinationSideFlags.All |
各辺の接続を制御。
| int height = 1 |
通常タイルの縦幅
| Vector2 position |
テクスチャ上の左上座標(ピクセル)
| int size |
1タイルの幅(ピクセル)
| Type type |
Tileのタイプ
| float uvShiftInside = 0.01f |
UVをタイルの内側にどれくらいずらすかのテクセル値。
| int width = 1 |
通常タイルの横幅
|
get |
Colliderの有無。
|
get |
Colliderに設定するIs Trigger。
|
get |
Colliderに設定するPhysicsMaterial2D。
|
get |
TileのCollider。
|
get |
TileColliderのObjectを返す。
|
get |
TileComponentの数を返す