'분류 전체보기'에 해당되는 글 495건

  1. 2015.01.04 unity3d Animator 상태 변이가 일어나는지 여부 판단.
  2. 2015.01.04 충돌한 Collider 의 종류에 따른 처리..
  3. 2015.01.04 unity3d stealth 카메라 움직임.
  4. 2015.01.04 Unity3d Stealth 에서 사용되는 Animator 관리( HashID)
  5. 2015.01.04 unity3d Stealth 코딩 스타일(Tag 를 사용)
  6. 2015.01.02 히어라이키 순서 변경(SetAsLastSibling, SetAsFirstSibling)
  7. 2015.01.02 부모 오브젝트 변경(SetParent)
  8. 2015.01.02 자기 자신의 컴포넌트 혹은 그 위 부모의 컴포넌트 반환(제네릭)
  9. 2014.12.23 br 태그.
  10. 2014.12.23 네트워크 책

unity3d Animator 상태 변이가 일어나는지 여부 판단.

|
public bool IsInTransition(int layerIndex);

Parameters

layerIndexThe layer's index.

Description

Is the specified AnimatorController layer in a transition.




메카님 애니메이션을 제어할시 .

SetBool 등을 사용해서 Transition(상태 전환) 이 일어나는지 여부 판단.

파라메터에는 레이어 인덱스를 넣어서 해당 레이어에서 상태 전환이 일어나는지 판단을 한다.

ex) 상태 전환이 일어날때 소리를 내기.

if(anim.IsInTransition(0) && !audio.isPlaying)

{

      audio.Play();

}



Trackback 0 And Comment 0

충돌한 Collider 의 종류에 따른 처리..

|
Trackback 0 And Comment 0

unity3d stealth 카메라 움직임.

|



캐릭터가 벽에 가려지는걸 방지하기 위해서 총 5개의 경로로 카메라가 이동하는 로직..

standardPos 는 처음 카메라의 위치이고.player.position + relCameraPos; -> relCameraPos = transform.position - player.position; -> transofrm.position;
abovePos는 플레이어의 위치에서 바로 위(직각으로)


Trackback 0 And Comment 0

Unity3d Stealth 에서 사용되는 Animator 관리( HashID)

|

HashID 를 사용해서 Animaotr 를 관리 할수 있다.

각 Animaotr 의 Animation 및 paramerator 값등을 StringToHash로 받아와서 그 값을 이용해서 애니메이션을 제어 할수 있다.


Animation 같은 경우 레이어명.애니메이션 이름으로 받아올수 있고

Parameters 같은 경우 이름명으로 받아올수 있음.








Trackback 0 And Comment 0

unity3d Stealth 코딩 스타일(Tag 를 사용)

|

이런식으로 태그로 등록된 값들을 태그 리스트에 저장을 하고 외부에서 
GameObject.FindGameObjectWithTag API를 사용해서 해당 태그로 지정된 게임 오브젝트를 찾을수 있다.


Trackback 0 And Comment 0

히어라이키 순서 변경(SetAsLastSibling, SetAsFirstSibling)

|

4.6 부터 unity canvas 가 생기고 히어라이키에 순서에 따라 보여지는 order by layer 값이 달라짐..

맨 위에 위치한게 가장 위에 뿌려짐..


그러므로 히어라이키의 순서가 변경되는 api 가 중요해짐.


가장 마지막으로 순서 변경

Transform.SetAsLastSibling

Move the transform to the end of the local transfrom list.

가장 처음으로 순서 변경

Transform.SetAsFirstSibling

Move the transform to the start of the local transfrom list.

순서 설정(index 값)

Transform.SetSiblingIndex

Sets the sibling index.

현재 순서 반환(index 값)

Transform.GetSiblingIndex

Gets the sibling index.

Trackback 0 And Comment 0

부모 오브젝트 변경(SetParent)

|
public void SetParent(Transform parent, bool worldPositionStays);

Parameters

parentThe parent Transform to use.
worldPositionStaysIf true, the parent-relative position, scale and rotation is modified such that the object keeps the same world space position, rotation and scale as before.

Description

Set the parent of the transform.

This method is the same as the parent property except that it's possible to make the Transform keep its local orientation rather than its global orientation by setting the worldPositionStays parameter to false.



두번째 인자 false 면 현재 transform 값 그대로 유지됨. ( 로컬포지션값이 그대로 유지 됨 -> 결국엔 부모 오브젝트에 따라 위치 

크기 등 변경.. 화면에 보이는 이미지가 변경)

첫번째 값 true면 transform 값 변경( 화면에 보이는 건 그대로 지만 로컬 포지션값이 변경됨)



Trackback 0 And Comment 0

자기 자신의 컴포넌트 혹은 그 위 부모의 컴포넌트 반환(제네릭)

|
Trackback 0 And Comment 0

br 태그.

|

xhtml 에서는 <br /> 이렇게 써주고 html5에서는 <br> 이렇게 써준다.


'웹관련' 카테고리의 다른 글

br 태그.  (0) 2014.12.23
주소체계와 데이터 정렬  (0) 2013.12.31
프로토콜  (0) 2013.12.31
윈도우 소켓  (0) 2013.12.31
소켓  (0) 2013.12.31
Trackback 0 And Comment 0

네트워크 책

|

"TCP/IP 소켓 프로그래밍", 윤성우 저
"TCP/IP 소켓 프로그래밍", 백창우 외 4명 공저, 한빛미디어 <- 이 책은 조금 더 깊은 내용
"Network Programming for Windows, 2nd Edition", Anthony Jones & Jim Ohlund, Microsoft Press 경우에는 Windows Network의 세부적인 내용까지 있어서 고급 개발자에게 추천할 수 있을 것 같습니다.
이 외에도 "Unix Network Programming", Stevens, Pretice-Hall 의 경우는 고급 Unix 쪽 네트웍 개발자를 위한 기본 도서 중 하나입니다

Trackback 0 And Comment 0
prev | 1 | 2 | 3 | 4 | 5 | 6 | 7 | ··· | 50 | next