/// <summary> /// 绘制攻击动画 /// </summary> /// <param name="item"></param> void drawAttackAction(RuntimeBattler item) { var battler = item.battler; // 朝向左时候才会翻转 sprite.flipX = battler.attackAniFlip && RuntimeCharacter.isLeftDir(item.direction); sprite.sprite = battler.getAttackAni(lastDir, aniRate); }
/// <summary> /// 绘制角色 /// </summary> /// <param name="item"></param> void drawCharacter(RuntimeBattler item) { var battler = item.battler; // 朝向左时候才会翻转 sprite.flipX = battler.characterFlip && RuntimeCharacter.isLeftDir(item.direction); sprite.sprite = battler.getCharacter(lastDir, aniRate); }