]> git.r.bdr.sh - rbdr/serpentity/blobdiff - README.md
Remove webpack config
[rbdr/serpentity] / README.md
index 50b8f868e182d2eea4911750ada2327d6b5ee342..6f4ddce5fecd2c358f72f001f4657e3770631f4f 100644 (file)
--- a/README.md
+++ b/README.md
@@ -4,7 +4,7 @@ Serpentity is a simple entity framework inspired by [Ash][ash].
 
 Usage:
 
-    const Serpentity = require('serpentity');
+    import Serpentity from '@serpentity/serpentity';
 
 ## Instantiating an engine
 
@@ -29,7 +29,8 @@ Remove entities or systems:
 
 Entities are the basic object of Serpentity, and they do nothing.
 
-    const entity = new Serpentity.Entity();
+    import { Entity } from '@serpentity/serpentity';
+    const entity = new Entity();
 
 All the behavior is added through components
 
@@ -38,7 +39,8 @@ All the behavior is added through components
 Components define data that we can add to an entity. This data will
 eventually be consumed by "Systems"
 
-    const PositionComponent = class PositionComponent extends Serpentity.Component {
+    import { Component } from '@serpentity/serpentity';
+    const PositionComponent = class PositionComponent extends Component {
       constructor(config) {
 
         this.x = 0;
@@ -60,7 +62,8 @@ Systems can refer to entities by requesting nodes.
 Nodes are sets of components that you define, so your system can require
 entities that always follow the API defined in the node.
 
-    const MovementNode = class MovementNode extends Serpentity.Node;
+    import { Node } from '@serpentity/serpentity';
+    const MovementNode = class MovementNode extends Node;
     MovementNode.position = PositionComponent;
     MovementNode.motion = MotionComponent;
 
@@ -73,7 +76,8 @@ that comply with that API
 
 Systems are called on every update, and they use components through nodes.
 
-    const TestSystem = class TestSystem extends Serpentity.System {
+    import { System } from '@serpentity/serpentity';
+    const TestSystem = class TestSystem extends System {
       added(engine){
 
         this.nodeList = engine.getNodes(MovementNode);
@@ -96,7 +100,4 @@ Systems are called on every update, and they use components through nodes.
 
 Just run `engine.update(dt)` in your game loop :D
 
-![Travis CI Build Status][travis-ci-badge]
-
 [ash]: http://www.ashframework.org/
-[travis-ci-badge]: https://travis-ci.org/serpentity/serpentity.svg?branch=master