일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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
- 확률
- No SQL
- 데이터 과학
- data science
- 몽고디비
- 김양재
- 우리들교회
- node.js
- 통계
- 빅 데이타
- 빅데이터
- Deep learning
- WebGL
- openCV
- 인공지능
- MongoDB
- 김양재 목사님
- 딥러닝
- probability
- R
- Artificial Intelligence
- Statistics
- 빅 데이터
- 주일설교
- nodeJS
- 빅데이타
- c++
- Big Data
- 김양재 목사
- Machine Learning
Archives
- Today
- Total
Scientific Computing & Data Science
How to Play Animation Sequence in Unity 본문
- #pragma strict
- /* Animation Switching
- - Put this script on the object you want to switch animation clips
- - Fill out the clip names (as named in project) on Animation Names in the order you want to play them
- */
- var animationNames : String[]; //Fill out the names in the Inspector
- private var currentAnimation : int = 0; //Keep track of our current animation
- private var animationComponent : Animation; //Cache the Animation Component
- function Start () {
- animationComponent = GetComponent(Animation);
- }
- function Update () {
- if (Input.GetButtonDown("Fire1")) {
- playAnimation();
- }
- }
- function playAnimation () {
- if(!animation.isPlaying) {
- animation.Play(animationNames[currentAnimation]);
- currentAnimation++;
- if(currentAnimation>=animationComponent.GetClipCount()) {
- currentAnimation=0;
- }
- }
- }
'CG & Video Games > Unity 3D' 카테고리의 다른 글
Putting the Power of Unitty In the Hands of Every Mobile Developer (0) | 2013.05.26 |
---|---|
Loading PNG Sequence (0) | 2013.05.26 |
Script for an Object Touched on Mobile Devices (0) | 2013.05.26 |
Script for an Object Clicked - an Alternative Method (0) | 2013.05.26 |
Script for an Object Clicked (0) | 2013.05.26 |
Comments