Package cc.plural.ecs.component.spatial

Examples of cc.plural.ecs.component.spatial.SpatialComponent


        xStore = -1;
    }

    @Override
    public void update(float delta) {
        SpatialComponent position = (SpatialComponent) gameObject.getComponent(SpatialComponent.class);
        if (position == null) {
            return;
        }
        /*
         float mouseXPosition = Mouse.getX();
View Full Code Here


        if (intent.getClass() == MouseListenerComponentMoveIntent.class) {
            MouseListenerComponentMoveIntent mouseMoveIntent = (MouseListenerComponentMoveIntent) intent;
            float x = mouseMoveIntent.getX();
            float y = mouseMoveIntent.getY();

            SpatialComponent position = (SpatialComponent) gameObject.getComponent(SpatialComponent.class);
            if (position == null) {
                return;
            }

View Full Code Here

    turnSpeed = 0.05F;
  }

  @Override
  public void update(float delta) {
    SpatialComponent position = (SpatialComponent) gameObject.getComponent(SpatialComponent.class);
    if(position == null) {
      return;
    }
   
    synchronized(position) {
View Full Code Here

    }

    public Node createNode() {
        Node object = new Node(this, nextId());
        object.setName("Node:" + object.getId());
        SpatialComponent spatial = new SpatialComponent();
        object.registerComponent(spatial);
        objects.add(object);
        return object;
    }
View Full Code Here

    }

    public Node createNode(String name) {
        Node object = new Node(this, nextId());
        object.setName(name);
        SpatialComponent spatial = new SpatialComponent();
        object.registerComponent(spatial);
        objects.add(object);
        return object;
    }
View Full Code Here

    }

    public GameObject createGameObject() {
        GameObject object = new GameObject(this, nextId());
        object.setName("Game Object:" + object.getId());
        SpatialComponent spatial = new SpatialComponent();
        object.registerComponent(spatial);
        objects.add(object);
        return object;
    }
View Full Code Here

    }

    public GameObject createGameObject(String name) {
        GameObject object = new GameObject(this, nextId());
        object.setName(name);
        SpatialComponent spatial = new SpatialComponent();
        object.registerComponent(spatial);
        objects.add(object);
        return object;
    }
View Full Code Here

        }
    }

    public void createSpatial() {
        if (spatial == null) {
            spatial = new SpatialComponent();
        }
    }
View Full Code Here

TOP

Related Classes of cc.plural.ecs.component.spatial.SpatialComponent

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.