🔘모바일버튼 이미지 변경하기

모바일 버튼의 이미지를 App.loadSpriteSheet로 불러온 이미지로 변경 할 수 있습니다.

참고: 모바일 점프버튼의 이미지 크기는 180 x 180px 입니다.


let button_image = App.loadSpritesheet("button_image.png");
let button;

App.onStart.Add(function () {
	// button 추가
	button = App.addMobileButton(8, 145, 75, function (player) {
		App.sayToAll(`${player.name}, 님이 버튼을 눌렀습니다.`)
	});

	button.image = button_image;
	button.sendUpdated();
});

Last updated