Examples of WaterSource


Examples of worldManager.gameEngine.WaterSource

                for (Zone zone : env.getZones()) {
                    packet.addBoolean(zone.isEnable());
                    packet.addShort16((short) zone.getID());
                    packet.addShort16((short) zone.getType());

                    WaterSource waterSource = zone.getWaterSource();
                    packet.addBoolean(waterSource != null);

                    if (waterSource != null) {
                        packet.addInt32(waterSource.getID());
                        packet.addInt32(waterSource.getMaxWater());
                        packet.addInt32(waterSource.getWater());
                    }
                }
            }
        }
View Full Code Here

Examples of worldManager.gameEngine.WaterSource

            System.out.println("x:" + x);
            System.out.println("y:" + y);
            System.out.println("z:" + z);


            WaterSource ws = new WaterSource(-1);
            ws.setPos(x, y, z);
            ws.setZoneID(zoneID);
            waters.add(ws);
        }

        System.out.println("*rts*******");
        for (WaterSource ws : waters) {
            ws.toString();
        }
        System.out.println("*******RequestWawterSource---Parse Ends*******");
    }
View Full Code Here

Examples of worldManager.gameEngine.WaterSource

                //Get this WaterSource from database just for its id.
                try {
                    List<WaterSource> sameWSList = WaterSourceDAO.getByZoneID(ws.getZoneID());
                    if (sameWSList != null) {
                        WaterSource sameWS = sameWSList.get(0);//Each zone only has one water source.
                        if (sameWS != null) {
                            Zone zone = currentEnv.getZoneByID(sameWS.getZoneID());
                            if (zone != null) {
//                                zone.getWaters().add(sameWS);
                            }
                        }
                    }
View Full Code Here

Examples of worldManager.gameEngine.WaterSource

            pstmt = connection.prepareStatement(query);
            pstmt.setInt(1, zone_id);
            ResultSet rs = pstmt.executeQuery();

            while (rs.next()) {
                WaterSource waterSource = new WaterSource(rs.getInt("water_source_id"));
                waterSource.setWater(rs.getInt("water"));
                waterSource.setMaxWater(rs.getInt("max_water"));
                waterSource.setRadius(rs.getInt("water_radius"));
                waterSource.setX(rs.getFloat("location_x"));
                waterSource.setY(rs.getFloat("location_y"));
                waterSource.setZ(rs.getFloat("location_z"));
                waterSource.setZoneID(rs.getInt("zone_id"));
                waterSourceList.add(waterSource);
            }

            rs.close();
            pstmt.close();
View Full Code Here

Examples of worldManager.gameEngine.WaterSource

        for (Zone zone : env.getZones()) {
            packet.addShort16((short) zone.getID());
            packet.addShort16((short) zone.getType());

            WaterSource waterSource = zone.getWaterSource();
            packet.addBoolean(waterSource != null);

            if (waterSource != null) {
                packet.addInt32(waterSource.getID());
                packet.addInt32(waterSource.getMaxWater());
                packet.addInt32(waterSource.getWater());
            }
        }

        return packet.getBytes();
    }
View Full Code Here

Examples of worldManager.gameEngine.WaterSource

                                zone.setParameters(ParamTableDAO.getByZoneID(zone_id));

                                ZoneType zoneType = ZoneTypeDAO.getZoneType(zone.getType());

                                if (zoneType.containsWater()) {
                                    WaterSource waterSource = new WaterSource(-1);
                                    waterSource.setMaxWater(100);
                                    waterSource.setWater(100);
                                    waterSource.setZoneID(zone_id);

                                    int water_source_id = WaterSourceDAO.createWaterSource(waterSource);
                                    waterSource.setID(water_source_id);

                                    zone.setWaterSource(waterSource);
                                }

                                env.setZone(zone);
View Full Code Here
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.