LargeTexture

Inherits: Texture < Resource < Reference < Object

已弃用。 一种能够存储许多带有偏移量的较小纹理的 Texture

描述

  • 已弃用(将在 Godot 4.0 中移除)。 * 一种能够存储许多具有偏移量的较小纹理的 Texture

你可以使用不同的偏移量向此 LargeTexture 动态添加Texture片段。

属性

int

flags

0 (overrides Texture)

方法

int

add_piece ( Vector2 ofs, Texture texture )

void

clear ( )

int

get_piece_count ( ) const

Vector2

get_piece_offset ( int idx ) const

Texture

get_piece_texture ( int idx ) const

void

set_piece_offset ( int idx, Vector2 ofs )

void

set_piece_texture ( int idx, Texture texture )

void

set_size ( Vector2 size )

方法说明

texture添加到这个LargeTexture,从偏移量ofs开始。


  • void clear ( )

清除LargeTexture


  • int get_piece_count ( ) const

返回此LargeTexture中的片段数。


返回索引为idx的片段的偏移量。


返回索引为 idx 的片段的 Texture


将索引为idx的片段的偏移量设置为ofs


  • void set_piece_texture ( int idx, Texture texture )

将索引为 idx 的片段的 Texture 设置为 texture


设置此LargeTexture的大小。