当前位置: 首页>>代码示例>>C#>>正文


C# Animator.GetBehaviour方法代码示例

本文整理汇总了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);
    }
开发者ID:albertus88,项目名称:demo,代码行数:8,代码来源:Character.cs

示例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>();
 }
开发者ID:algol001,项目名称:CSVRTutorial_Unity,代码行数:10,代码来源:PageImageScript.cs

示例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;
    }
开发者ID:elzayat-mohamed,项目名称:BATPeople,代码行数:11,代码来源:CameraController.cs

示例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>();
    }
开发者ID:algol001,项目名称:CSVRTutorial_Unity,代码行数:19,代码来源:NotebookScript.cs

示例5: ResetStateManager

 public void ResetStateManager(Animator _animator)
 {
     attackState = _animator.GetBehaviour<CharacterAttackState> ();
     deadState = _animator.GetBehaviour<CharacterDeadState> ();
     skillState = _animator.GetBehaviour<CharacterSkillState>();
 }
开发者ID:dsanekata,项目名称:BattleMock_2D,代码行数:6,代码来源:CharacterAnimationStateManager.cs

示例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();
    }
开发者ID:algol001,项目名称:CSVRTutorial_Unity,代码行数:18,代码来源:CardScript.cs

示例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();
 }
开发者ID:exolution,项目名称:cosmic-editor,代码行数:12,代码来源:MainActorController.cs

示例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();
    }
开发者ID:jegriffi,项目名称:SeanJamesMattAndrew,代码行数:25,代码来源:TalkingScript.cs


注:本文中的Animator.GetBehaviour方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。