コード例 #1
0
ファイル: GameManager.cs プロジェクト: pasketi/Dicey
 public IEnumerator SwitchNPC(NPCCharacter NPCScript)
 {
     Debug.Log("Switching NPC to " + NPCScript._characterName);
     NPCAnimator.SetBool("OnStage", false);
     do
     {
         if (NPCAnimator.GetCurrentAnimatorStateInfo(0).IsName("OffStage"))
         {
             NPCImage.sprite = NPCScript.GetNPCSprite;
             NPCName.text    = NPCScript._characterName;
             NPCAnimator.SetBool("OnStage", true);
         }
         else
         {
             yield return(new WaitForEndOfFrame());
         }
     } while (!NPCAnimator.GetBool("OnStage"));
     yield return(true);
 }
コード例 #2
0
ファイル: RefreshButton.cs プロジェクト: hunj/NineChronicles
        private void Awake()
        {
            _sortingGroup = GetComponent <SortingGroup>();
            TouchHandler  = GetComponentInChildren <TouchHandler>();

            TouchHandler.OnClick
            .Merge(TouchHandler.OnDoubleClick)
            .Merge(TouchHandler.OnMultipleClick)
            .Subscribe(_ => PlayAnimation(NPCAnimation.Type.Click))
            .AddTo(gameObject);
            TouchHandler.OnMouseDown
            .Subscribe(_ => PlayAnimation(NPCAnimation.Type.Over))
            .AddTo(gameObject);

            Animator = new NPCAnimator(this)
            {
                TimeScale = AnimatorTimeScale
            };
            Animator.OnEvent.Subscribe(OnAnimatorEvent);
        }
コード例 #3
0
    //private

#if UNITY_EDITOR
    private void Reset()
    {
        anim = GetComponent <NPCAnimator>();
    }
コード例 #4
0
ファイル: Animal.cs プロジェクト: nansonzheng/GGJ2019SCAF
 void Awake()
 {
     state       = AnimalState.ACTIVE;
     npcAnimator = GetComponent <NPCAnimator>();
 }
コード例 #5
0
 private void Awake()
 {
     movement = GetComponent <NPCMovement>();
     anim     = GetComponent <NPCAnimator>();
 }
コード例 #6
0
 private void Awake()
 {
     npcAnimator = GetComponent <NPCAnimator>();
     stat        = GetComponent <Stat>();
 }
コード例 #7
0
 private void Awake()
 {
     animator = this.GetComponent <NPCAnimator>();
     phoneWalk.SetActive(false);
     phoneIdle.SetActive(true);
 }