Package net.sf.arianne.marboard.server.action.create

Source Code of net.sf.arianne.marboard.server.action.create.CreateOvalAction

package net.sf.arianne.marboard.server.action.create;

import marauroa.common.game.RPAction;
import net.sf.arianne.marboard.server.core.engine.MarboardZone;
import net.sf.arianne.marboard.server.entity.meta.User;
import net.sf.arianne.marboard.server.entity.shape.Oval;
import net.sf.arianne.marboard.server.entity.shape.Shape;
/**
* Action to create an oval shape
*
* @author madmetzger
*
*/
public class CreateOvalAction extends CreateAction {

  @Override
  protected void perform(User user, RPAction action) {
    MarboardZone zone = user.getZone();
    Shape shape = new Oval(action.getInt("color"), action.getInt("fill_color"), action.getInt("thickness"), action.getInt("x"), action.getInt("y"), action.getInt("x2"), action.getInt("y2"));
    zone.add(shape);
  }

}
TOP

Related Classes of net.sf.arianne.marboard.server.action.create.CreateOvalAction

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.