Package org.rsbot.event.impl

Source Code of org.rsbot.event.impl.TAnimation

package org.rsbot.event.impl;

import org.rsbot.bot.Bot;
import org.rsbot.event.listeners.TextPaintListener;
import org.rsbot.script.methods.MethodContext;
import org.rsbot.script.wrappers.RSPlayer;
import org.rsbot.util.StringUtil;

import java.awt.*;

public class TAnimation implements TextPaintListener {
  private final MethodContext ctx;

  public TAnimation(final Bot bot) {
    ctx = bot.getMethodContext();
  }

  public int drawLine(final Graphics render, int idx) {
    final int[] a = { -1, -1 };
    if (ctx.game.isLoggedIn()) {
      final RSPlayer player = ctx.players.getMyPlayer();
      a[0] = player.getAnimation();
      a[1] = player.getPassiveAnimation();
    }
    StringUtil.drawLine(render, idx++, "Animation " + a[0]);
    StringUtil.drawLine(render, idx++, "Stance Animation " + a[1]);
    return idx;
  }
}
TOP

Related Classes of org.rsbot.event.impl.TAnimation

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.