コード例 #1
0
 private void Awake()
 {
     if ((this.animation == null) && ((this.animation = base.animation) == null))
     {
         Debug.LogError("There must be a animation component defined!", this);
     }
     this.animationTrait = base.GetTrait <CharacterAnimationTrait>();
     if (!this.animationTrait.movementAnimationSetup.CreateSampler(this.animation, out this.movement))
     {
         Debug.LogError("Failed to make movement sampler", this);
     }
 }
コード例 #2
0
ファイル: PlayerAnimation.cs プロジェクト: HexHash/LegacyRust
 private void Awake()
 {
     if (!this.animation)
     {
         Animation animations = base.animation;
         Animation animations1 = animations;
         this.animation = animations;
         if (!animations1)
         {
             Debug.LogError("There must be a animation component defined!", this);
         }
     }
     this.animationTrait = base.GetTrait<CharacterAnimationTrait>();
     if (!this.animationTrait.movementAnimationSetup.CreateSampler(this.animation, out this.movement))
     {
         Debug.LogError("Failed to make movement sampler", this);
     }
 }