일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
Tags
- No SQL
- R
- 데이터 과학
- WebGL
- MongoDB
- Machine Learning
- 몽고디비
- Artificial Intelligence
- c++
- Big Data
- node.js
- 통계
- 빅데이타
- 김양재 목사님
- data science
- 빅 데이터
- openCV
- 김양재 목사
- 빅데이터
- Deep learning
- nodeJS
- 딥러닝
- 김양재
- 인공지능
- Statistics
- 빅 데이타
- 확률
- 우리들교회
- probability
- 주일설교
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 |