浏览代码
Random idle for PigChef
Random idle for PigChef
Added script to randomise idle animation, small fix for the transition to jump, plus transitions between the two idles/devlogs-4-addressable-assets
Ciro Continisio
4 年前
当前提交
a1bec1ec
共有 3 个文件被更改,包括 88 次插入 和 4 次删除
-
67UOP1_Project/Assets/Art/Characters/PigChef/Animation/PigChef.controller
-
14UOP1_Project/Assets/RandomIdleAnimationBehaviour.cs
-
11UOP1_Project/Assets/RandomIdleAnimationBehaviour.cs.meta
|
|||
using System.Collections; |
|||
using System.Collections.Generic; |
|||
using UnityEngine; |
|||
|
|||
public class RandomIdleAnimationBehaviour : StateMachineBehaviour |
|||
{ |
|||
override public void OnStateEnter(Animator animator, AnimatorStateInfo stateInfo, int layerIndex) |
|||
{ |
|||
int randomIdle = Random.Range(0, 2); |
|||
animator.SetInteger("RandomIdle", randomIdle); |
|||
|
|||
Debug.Log("Random"); |
|||
} |
|||
} |
|
|||
fileFormatVersion: 2 |
|||
guid: 52106b5e7fe9fd54bb1add9a00a5f911 |
|||
MonoImporter: |
|||
externalObjects: {} |
|||
serializedVersion: 2 |
|||
defaultReferences: [] |
|||
executionOrder: 0 |
|||
icon: {instanceID: 0} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
撰写
预览
正在加载...
取消
保存
Reference in new issue