Package net.tacospice.stevenet

Examples of net.tacospice.stevenet.Node


  @Override
  public void clientConnected(NetConnection connection)
  {
    logMessage("* Connected client " + connection.getID() + ", " + connection.getRemoteAddressTCP());
    Node entityNode = server.createNode(Entity.getClassId());
    entityNode.setOwner(connection.getID());

    Entity entity = new Entity(entityNode, 0, 0);

    game.addEntity(entity);
    server.addNode(entityNode);
    eventHandler.entityCreated(entity, true);

    logMessage("  Created entity " + entityNode.getId() + "/" + entityNode.getClassId());
  }
View Full Code Here


  }

  @Override
  public boolean nodeCreated(int nodeId, int classId, boolean owner)
  {
    Node n = new Node(nodeId, classId, false);

    if (classId == Entity.getClassId())
    {
      Entity entity = new Entity(n, 0, 0);
      if (owner)
        n.setOwner(1);

      game.addEntity(entity);
      eventHandler.entityCreated(entity, false);

      client.addNode(n);
View Full Code Here

TOP

Related Classes of net.tacospice.stevenet.Node

Copyright © 2018 www.massapicom. 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.