コード例 #1
0
    void Awake()
    {
        //Get Almak demek
        //Biz bir Gameobject'in üzerindeki bir Script'i veya Component'ı çekmek için GetComponent kullanıyoruz.

        animancer = GetComponent <AnimancerComponent>(); //bunu yapmasak ne olurdu ? oyun devam ederdi
    }
コード例 #2
0
 void Awake()
 {
     if (!_animancer)
     {
         _animancer = GetComponent <AnimancerComponent> ();
     }
 }
コード例 #3
0
ファイル: Enemy.cs プロジェクト: SonGit/Hellwalker
    // Use this for initialization
    protected virtual void Start()
    {
        rvoAgent = this.GetComponent <RVOAgent>();

        characterController = this.GetComponent <CharacterController>();

        animancer = this.GetComponent <AnimancerComponent>();

        lastState = currentState;
    }
コード例 #4
0
        public override void Dispose()
        {
            if (this.IsDisposed)
            {
                return;
            }

            base.Dispose();

            this.AnimancerComponent = null;
            this.AnimationClips.Clear();
            this.AnimationClips = null;
            RuntimeAnimationClips.Clear();
            this.RuntimeAnimationClips = null;
            this.StackFsmComponent     = null;
        }
コード例 #5
0
        public void Initialize(Controller controller)
        {
            Controller = controller;
            Anim       = GetComponent <AnimancerComponent>();

            // Set the upper body layer
            Anim.SetLayerMask(1, UpperbodyMask);
            Anim.GetLayer(1).SetWeight(1);
            // Set additive layer
            Anim.SetLayerMask(2, AdditiveMask);
            Anim.GetLayer(2).SetWeight(1);
            Anim.GetLayer(2).IsAdditive = true;

            // Setup sound source
            foreach (AudioSource source in transform.root.GetComponentsInChildren <AudioSource>())
            {
                source.spatialBlend = Networker.IsOwner ? 0.0f : 1.0f;
            }
        }
コード例 #6
0
 protected void Awake()
 {
     SR        = GetComponent <SpriteRenderer>() ?? null;
     Animancer = GetComponent <AnimancerComponent>() ?? null;
     PostAwake();
 }
コード例 #7
0
 void Awake()
 {
     animancer = GetComponent <AnimancerComponent>();
 }
コード例 #8
0
 private void Awake()
 {
     targetBank = GetComponent <EnemyTargetBank>() ?? null;
     animancer  = GetComponent <AnimancerComponent>() ?? null;
 }
コード例 #9
0
 protected void Awake()
 {
     Animancer.WarningType.EndEventInterrupt.Disable();
     animancer = GetComponent <AnimancerComponent>() ?? null;
 }