コード例 #1
0
    private void ExtractAnimator(GameEntity entity)
    {
        AnimatorLink link = entity.gameObject.Value.GetComponent <AnimatorLink>();

        if (link != null &&
            link.Animator != null)
        {
            entity.AddAnimator(link.Animator);
        }
    }
        public void Awake()
        {
            animator = GetComponentInChildren <Animator>();

            locomotion           = GetComponent <Locomotion>();
            locomotionWasEnabled = locomotion.isActiveAndEnabled;
            ecoTarget            = GetComponent <EcoTarget>();
            animatorLink         = GetComponentInChildren <AnimatorLink>();
            rb        = GetComponent <Rigidbody>();
            modelRoot = GetComponentInChildren <Renderer>().gameObject;

            iceMaterial = Player.main.GetComponent <PlayerFrozenMixin>().GetPrivateField("iceMaterial") as Material;
        }