Class Unit
클라이언트 상에서의 유닛
네임스페이스: Game.Scripts
어셈블리: Assembly-CSharp.dll
Syntax
[MoonSharpUserData]
public class Unit : ScriptTweening
생성자
Unit(MovableUnit)
클라이언트 상에서의 유닛
선언
public Unit(MovableUnit unit)
매개 변수(인자)
타입 | 이름 | 설명 |
---|---|---|
Game.Unit.MovableUnit | unit |
변수
_unit
클라이언트 상에서의 유닛
선언
public MovableUnit _unit
필드 값
타입 | 설명 |
---|---|
Game.Unit.MovableUnit |
customData
클라이언트 상에서의 유닛
선언
public Table customData
필드 값
타입 | 설명 |
---|---|
MoonSharp.Interpreter.Table |
프로퍼티
buffs
유닛의 버프를 TBuff[] 형식으로 얻어옵니다.
선언
public TBuff[] buffs { get; }
프로퍼티 값
타입 | 설명 |
---|---|
TBuff[] |
clanID
유닛의 클랜 ID
선언
public long clanID { get; }
프로퍼티 값
타입 | 설명 |
---|---|
long |
collisionHeight
유닛의 충돌 세로크기
선언
public int collisionHeight { get; }
프로퍼티 값
타입 | 설명 |
---|---|
int |
collisionWidth
유닛의 충돌 가로크기
선언
public int collisionWidth { get; }
프로퍼티 값
타입 | 설명 |
---|---|
int |
color
유닛의 컬러를 설정합니다.
선언
public Color color { get; set; }
프로퍼티 값
타입 | 설명 |
---|---|
Color |
dead
유닛의 사망 여부
선언
public bool dead { get; }
프로퍼티 값
타입 | 설명 |
---|---|
bool |
delayUntilDead
유닛이 죽은 후 시체가 사라지기 전까지 딜레이
선언
public int delayUntilDead { get; set; }
프로퍼티 값
타입 | 설명 |
---|---|
int |
direction
이 유닛의 X,Y 방향 좌표
선언
public Point direction { get; set; }
프로퍼티 값
타입 | 설명 |
---|---|
Point |
dirX
이 유닛의 X 방향 좌표
선언
public float dirX { get; set; }
프로퍼티 값
타입 | 설명 |
---|---|
float |
dirY
이 유닛의 Y 방향 좌표
선언
public float dirY { get; set; }
프로퍼티 값
타입 | 설명 |
---|---|
float |
exp
이 유닛의 경험치
선언
public virtual long exp { get; }
프로퍼티 값
타입 | 설명 |
---|---|
long |
hp
체력
선언
public long hp { get; }
프로퍼티 값
타입 | 설명 |
---|---|
long |
HPBarVisible
유닛 HPBar의 활성화 여부.
선언
public bool HPBarVisible { get; set; }
프로퍼티 값
타입 | 설명 |
---|---|
bool |
id
유닛의 ID
선언
public long id { get; }
프로퍼티 값
타입 | 설명 |
---|---|
long |
level
레벨
선언
public int level { get; }
프로퍼티 값
타입 | 설명 |
---|---|
int |
maxEXP
이 유닛의 다음 레벨 도달 경험치
선언
public virtual long maxEXP { get; }
프로퍼티 값
타입 | 설명 |
---|---|
long |
maxHP
최대 체력
선언
public long maxHP { get; }
프로퍼티 값
타입 | 설명 |
---|---|
long |
maxMP
최대 마나
선언
public long maxMP { get; }
프로퍼티 값
타입 | 설명 |
---|---|
long |
moveSpeed
이동 속도
선언
public int moveSpeed { get; }
프로퍼티 값
타입 | 설명 |
---|---|
int |
mp
마나
선언
public long mp { get; }
프로퍼티 값
타입 | 설명 |
---|---|
long |
name
유닛의 이름
선언
public string name { get; }
프로퍼티 값
타입 | 설명 |
---|---|
string |
nameControl
유닛의 이름 객체를 리턴합니다.
선언
public Text nameControl { get; }
프로퍼티 값
타입 | 설명 |
---|---|
Text |
position
유닛의 위치를 설정합니다.
선언
public Point position { get; set; }
프로퍼티 값
타입 | 설명 |
---|---|
Point |
rigidbody
유닛의 물리효과
선언
public Rigidbody rigidbody { get; }
프로퍼티 값
타입 | 설명 |
---|---|
Rigidbody |
rotation
유닛의 각도를 설정합니다.
선언
public float rotation { get; set; }
프로퍼티 값
타입 | 설명 |
---|---|
float |
scale
유닛의 스케일을 설정합니다.
선언
public Point scale { get; set; }
프로퍼티 값
타입 | 설명 |
---|---|
Point |
size
유닛의 픽셀 사이즈를 리턴합니다.
선언
public Point size { get; }
프로퍼티 값
타입 | 설명 |
---|---|
Point |
sortOrder
캐릭터를 보여주는 정렬 순서값
선언
public int sortOrder { get; set; }
프로퍼티 값
타입 | 설명 |
---|---|
int |
state
유닛의 상태
0: Default
1: Running
2: Jump (Only Platformer Mode)
3: Jump and Move (Only Platformer Mode)
선언
public int state { get; }
프로퍼티 값
타입 | 설명 |
---|---|
int |
tilePosition
유닛이 위치한 타일 좌표를 반환합니다.
선언
public Point tilePosition { get; }
프로퍼티 값
타입 | 설명 |
---|---|
Point |
type
유닛의 타입을 반환합니다.
0: PLAYER
1: EVENT
2: ENEMY
3: PET
선언
public int type { get; }
프로퍼티 값
타입 | 설명 |
---|---|
int |
valid
오브젝트의 유효 여부
선언
public bool valid { get; }
프로퍼티 값
타입 | 설명 |
---|---|
bool |
x
이 유닛의 X 좌표
선언
public float x { get; set; }
프로퍼티 값
타입 | 설명 |
---|---|
float |
y
이 유닛의 Y 좌표
선언
public float y { get; set; }
프로퍼티 값
타입 | 설명 |
---|---|
float |
함수
DOColor(Color, float)
이 유닛의 색깔을 target의 색깔로 duration 동안 바꾼다.
선언
public override ScriptTweener DOColor(Color target, float duration)
매개 변수(인자)
타입 | 이름 | 설명 |
---|---|---|
Color | target | 바꿀 컬러 |
float | duration | 시간 (초) |
반환
타입 | 설명 |
---|---|
ScriptTweener |
재정의
DOScale(Point, float)
클라이언트 상에서의 유닛
선언
public ScriptTweener DOScale(Point target, float duration)
매개 변수(인자)
타입 | 이름 | 설명 |
---|---|---|
Point | target | |
float | duration |
반환
타입 | 설명 |
---|---|
ScriptTweener |
HasBuff(int)
버프를 가지고있는지 여부
선언
public bool HasBuff(int id)
매개 변수(인자)
타입 | 이름 | 설명 |
---|---|---|
int | id | 데이터 버프 ID |
반환
타입 | 설명 |
---|---|
bool |
PlayOneShotAction(string, int)
유닛의 애니메이션 재생
선언
public void PlayOneShotAction(string name, int delay)
매개 변수(인자)
타입 | 이름 | 설명 |
---|---|---|
string | name | 애니메이션 이름 |
int | delay | 애니메이션 딜레이 |
PlayOneShotAction(string)
유닛의 애니메이션 재생
선언
public void PlayOneShotAction(string name)
매개 변수(인자)
타입 | 이름 | 설명 |
---|---|---|
string | name | 애니메이션 이름 |
RunEventCommand()
이 이벤트 유닛의 이벤트 커맨드를 실행합니다.
선언
public void RunEventCommand()
Say(string, Color)
유닛이 말하게 합니다
선언
public void Say(string text, Color color = null)
매개 변수(인자)
타입 | 이름 | 설명 |
---|---|---|
string | text | 대화 내용 |
Color | color | 색 |
SayEmoticon(string, int)
유닛에 이모티콘을 표시합니다
선언
public void SayEmoticon(string id, int loops = 2)
매개 변수(인자)
타입 | 이름 | 설명 |
---|---|---|
string | id | 표시할 이모티콘 ID |
int | loops | 반복 횟수 (기본: 2) |
ShowAnimation(int)
해당 유닛의 위치에 애니메이션을 재생합니다.
선언
public void ShowAnimation(int animationID)
매개 변수(인자)
타입 | 이름 | 설명 |
---|---|---|
int | animationID | 애니메이션의 ID |
StopAnimation(int)
해당 유닛이 재생 중이던 애니메이션을 중단합니다.
선언
public void StopAnimation(int animationID)
매개 변수(인자)
타입 | 이름 | 설명 |
---|---|---|
int | animationID | 애니메이션의 ID |