package com.robot.player.state;

import com.robot.Router;
import com.robot.data.Player;
import com.robot.state.StateBase;
import com.taurus.core.entity.ITObject;
import com.taurus.core.entity.TObject;

/**
 * 玩家缺体力值弹出状态
 * 
 */
public class PlayerPopupState extends StateBase<Player>{
	/**
	 * 进入状态时处理
	 * 
	 * @param owner
	 */
	public void enter(Player owner) {
		owner.spectator = true;
		ITObject msg = TObject.newInstance();
		msg.putInt("seat", owner.seat);
		owner.room.broadCastToClient(0, Router.GAME_EVT_STAND_UP, msg);
		
	}

	/**
	 * 退出状态时处理
	 * 
	 * @param owner
	 */
	public void exit(Player owner) {
		owner.spectator = false;
	}
}
