Game Maker Language リファレンス > 組み込み関数 用途別 > ゲームプレイ > instance_create_layer()
instance_create_layer() †
描画レイヤー を指定してインスタンスを生成します。
構文 †
instance_create_depth(x, y, layer_id, obj);
- x
- インスタンスを配置するX座標
- y
- インスタンスを配置するY座標
- layer_id
- 描画レイヤー番号
- obj
- 生成するオブジェクト
戻り値 †
- Real
- 生成したインスタンスのID
var inst = instance_create_layer(x, y, "instance_layer", obj_Bullet);
with (inst)
{
speed = other.shoot_speed;
direction = other.image_angle;
}
上記コードは "obj_Bullet" を 描画レイヤー "instance_layer" に生成し、速度と角度を設定しています。
Wiki内検索
#search(): You already view a search box
MENU
2ch
その他
最新の30件
2024-03-07
2023-08-09
2023-05-21
2023-05-20
2023-05-04
2022-10-13
2022-07-21
2022-07-02
2022-04-06
2021-11-30
2021-11-26
2021-10-03
2021-09-23
2021-08-15
2021-06-02
2021-01-23
2021-01-21
2021-01-19
2021-01-18
2021-01-16
2021-01-15
人気の10件
今日の10件
これまでの訪問者: 1825
今日の訪問者: 1
昨日の訪問者: 3
閲覧者: 4