예제 #1
0
    void SerializeProto(Game.EntityPrototype proto)
    {
        var json = Newtonsoft.Json.JsonConvert.SerializeObject(proto, Newtonsoft.Json.Formatting.Indented);

        using (var writer = new System.IO.StreamWriter(System.IO.Path.Combine("Units", proto.name + ".json"))) {
            writer.Write(json);
        }
    }
예제 #2
0
파일: Entity.cs 프로젝트: rbarraud/blarg4
 public Entity(int team, DVector3 position, EntityPrototype prototype)
 {
     this.eid       = World.current.RegisterEntity(this);
     this.team      = team;
     this.position  = position;
     this.isAlive   = true;
     this.prototype = prototype;
     this.modelName = prototype.name;
 }
예제 #3
0
파일: Entity.cs 프로젝트: rbarraud/blarg4
 public Entity(int team, DVector3 position, string modelName)
 {
     this.eid       = World.current.RegisterEntity(this);
     this.team      = team;
     this.position  = position;
     this.modelName = modelName;
     this.isAlive   = true;
     this.prototype = null;
 }