public void SetAnimationSet(AnimationSet set)
 {
     currentSet   = set;
     animTime     = 0;
     animIndex    = 0;
     image.sprite = currentSet.GetAnimationSprite(currentType, animIndex);
     image.SetNativeSize();
 }
 // Update is called once per frame
 void Update()
 {
     if (sr.battleSetup.InBattle)
     {
         animTime += Time.deltaTime;
         if (currentSet != null)
         {
             animIndex    = currentSet.GetAnimationIndex(currentType, lookDirection, animTime);
             image.sprite = currentSet.GetAnimationSprite(currentType, animIndex);
             if (currentSet.isLunen && mirrorSprites)
             {
                 transform.localScale = mirroredVector3;
             }
             else
             {
                 transform.localScale = normalVector3;
             }
         }
     }
 }
示例#3
0
 public void SetSprite()
 {
     spriteRenderer.sprite = animationSet.GetAnimationSprite(animationType, animIndex);
 }