using UnityEngine; using System.Collections; using System.Collections.Generic; using Sfs2X.Entities.Data; public class StationHandler : BAHandler { public StationHandler(BARoom room):base(room){} public override void HandleRequest (BAServer server, ISFSObject msg, int sender, int timeStamp) { ISFSObject data = msg.GetSFSObject (Message.LABEL_DATA); if(data.ContainsKey("i")) { server.RoomHandleResponse (msg); } else if(room.IsHost()) { int crystalIndex = data.GetInt("c"); int teamId = data.GetInt("t"); BAStation station = room.AttempAddStation (crystalIndex, teamId); if(station != null) { data.PutInt ("i", station.id); server.Send (msg); } } } }