コード例 #1
0
ファイル: Item.cs プロジェクト: BigWan/BigGame_RunRun
        private void OnTriggerEnter(Collider other)
        {
            ItemCollector ic = other.GetComponent <ItemCollector>();

            if (ic is ItemCollector)
            {
                if (ic.hasMagnet)
                {
                    StartFollow(other.transform);
                }
                StartDisappear(other.transform);
            }
        }
コード例 #2
0
        //private FaceManager face;
        //private SpringManager spring;
        //private RandomWind wind;
        //private IKLookAt lookat;

        void GetComponents()
        {
            animator        = GetComponent <Animator>();
            capsuleCollider = GetComponent <CapsuleCollider>();
            collector       = GetComponentInChildren <ItemCollector>();
        }