Example #1
0
 public override void Format(ScriptWriter sw, IScriptFormatterContext formatterContext, IServices services)
 {
     sw.Format(formatterContext, services)
     .CommentLine(MusicName.Get(_musicId))
     .StaticType(nameof(IMusicService))
     .Method(nameof(IMusicService.ChangeBattleMusic))
     .Enum(_musicId)
     .Comment(nameof(SETBATTLEMUSIC));
 }
Example #2
0
        public override void Format(ScriptWriter sw, IScriptFormatterContext formatterContext, IServices services)
        {
            var formatter = sw.Format(formatterContext, services);

            if (_musicId is IConstExpression expr)
            {
                formatter.CommentLine(MusicName.Get((MusicId)expr.Int32()));
            }

            formatter
            .StaticType(nameof(IMusicService))
            .Method(nameof(IMusicService.LoadFieldMusic))
            .Argument("musicId", _musicId)
            .Comment(nameof(MUSICLOAD));
        }