本文整理汇总了C#中Animator.GetBehaviour方法的典型用法代码示例。如果您正苦于以下问题:C# Animator.GetBehaviour方法的具体用法?C# Animator.GetBehaviour怎么用?C# Animator.GetBehaviour使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Animator
的用法示例。
在下文中一共展示了Animator.GetBehaviour方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Start
// Use this for initialization
void Start()
{
_animator = gameObject.GetComponentInChildren<Animator> ();
w = _animator.GetBehaviour<Walk> ();
w.Init (velocity, transform);
}
示例2: Start
// Use this for initialization
void Start()
{
anim = GetComponent<Animator>();
stateGlow = Animator.StringToHash("Photo.Glow");
beh = anim.GetBehaviour<StateEventBehaviour>();
beh.StateEntered += Beh_StateEntered;
currentSprite = EmptySprite;
img = GetComponent<Image>();
}
示例3: Awake
void Awake()
{
animatorController = this.GetComponent<Animator>();
if (animatorController == null) throw new MissingReferenceException("Missing a reference to the PlayerAnimatorControler on the " + this.gameObject);
camera = this.GetComponent<Transform>();
var zoomOutState = animatorController.GetBehaviour<AnimationStateEventDelegator>();
zoomOutState.OnExit += OnZoomOutExit;
}
示例4: Start
// Use this for initialization
void Start()
{
firstMesh = FirstPage.GetComponent<MeshRenderer>();
secondMesh = SecondPage.GetComponent<MeshRenderer>();
cont = FPSPlayer.GetComponent<PlayerController>();
anim = GetComponent<Animator>();
beh = anim.GetBehaviour<StateEventBehaviour>();
beh.StateEntered += Beh_StateEntered;
beh.StateExited += Beh_StateExited;
idleState = Animator.StringToHash("Notebook.Idle");
forwardState = Animator.StringToHash("Notebook.Forward");
backwardState = Animator.StringToHash("Notebook.Backward");
closedState = Animator.StringToHash("Notebook.Closed");
lastInfo = anim.GetCurrentAnimatorStateInfo(0);
audioSource = GetComponent<AudioSource>();
}
示例5: ResetStateManager
public void ResetStateManager(Animator _animator)
{
attackState = _animator.GetBehaviour<CharacterAttackState> ();
deadState = _animator.GetBehaviour<CharacterDeadState> ();
skillState = _animator.GetBehaviour<CharacterSkillState>();
}
示例6: Start
// Use this for initialization
void Start()
{
cont = FPSPlayer.GetComponent<PlayerController>();
parts = GetComponent<ParticleSystem>();
targetScript = TargetImage.GetComponent<PageImageScript>();
nbscript = Notebook.GetComponent<NotebookScript>();
stateSpinning = Animator.StringToHash("Card.Spinning");
stateStopped = Animator.StringToHash("Card.Stopped");
statePutaway = Animator.StringToHash("Card.Putaway");
anim = GetComponentInChildren<Animator>();
beh = anim.GetBehaviour<StateEventBehaviour>();
beh.StateEntered += Beh_StateEntered;
beh.StateExited += Beh_StateExited;
// linkedScripts = LinkedCards.Select(i => i.GetComponent<CardScript>()).ToArray();
}
示例7: Start
// Use this for initialization
void Start()
{
m_characterCtrl = GetComponent<CharacterController>();
m_animator = GetComponent<Animator>();
damageController = GetComponent<DamageController>();
AttackBehaviour ab = m_animator.GetBehaviour<AttackBehaviour>();
//ab.damageController = damageController;
target = GameObject.Find("ashe");
navAgent = GetComponent<NavMeshAgent>();
Shader.WarmupAllShaders();
}
示例8: Start
// SAMPLE TEXT that is hardcoded for now//
// -- Can be somewhat dynamic later on -- //
// Use this for initialization
void Start()
{
//menuCanvas.SetActive(false);
animator = animator.GetComponent<Animator>();
portrait = portrait.GetComponent<Image>();
animator.GetBehaviour <TransClass> ().transition=nextScene;
for(int i=0; i< charsToLoad; ++i)
charImg[i]=charImg[i].GetComponent<Image>();
charName = charName.GetComponent<Text>();
continueText=continueText.GetComponent<Button>();
convoText= convoText.GetComponent<Button>();
portrait.sprite=charImg[person[currPart]].sprite;
charName.text=charImg[person[currPart]].tag;
convoText.GetComponentInChildren<Text>().text=speech[currPart++];
//menuCanvas.SetActive();
}