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