Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 | 31 |
Tags
- 개발 독서
- 게임 축제
- 인디게임
- 던전그리드
- steam
- 픽셀
- 팀
- 개발자
- 개발 학습
- 스팀게임
- 요즘뜨는게임
- 게임개발
- 게임
- Godot
- 코딩
- 좀100
- 인디개발
- gdscript
- Player
- 이터널리턴
- 픽셀게임
- 일상
- 스팀
- 인디게임개발
- Godot강의
- Steam API
- 픽셀 게임 추천
- 게임제작
- 핫한게임
- 개발
Archives
- Today
- Total
[게임개발자] 레드핑
Godot weapon GDscript 본문
Godot Weapon.gd
가 필요
extends Node2D
var attack_dmg :=10.0
# Called when the node enters the scene tree for the first time.
func _on_hitbox_area_entered(area):
if area.has_method("damage"):
var attack = Attack.new()
attack.attack_damage = attack_dmg
area.damage(attack)
What is has_method
?
직접 참조보다는 느리지만, 해당 인자를 String 으로 받아서 찾아주는 함수.
'일상 > 개발일상' 카테고리의 다른 글
개발 지금 상황 (0) | 2023.10.31 |
---|---|
Godot Attack component 만든후 문제 (0) | 2023.10.16 |
Godot hitboxComponent (0) | 2023.10.12 |
Godot Attack 만드는법 (2) (0) | 2023.10.11 |
Godot Attack 만드는법 (0) | 2023.10.10 |