Exemple #1
0
    public override BZFlag.Map.Elements.BasicObject ToBZWObject()
    {
        var obj = new BZFlag.Map.Elements.BasicObject();

        obj.ObjectType = ObjectType;
        obj.Attributes = CodeLines;
        obj.GUID       = GUID;

        return(obj);
    }
Exemple #2
0
    public static GameObject AddMapObject <T>(GameObject gb, BZFlag.Map.Elements.BasicObject obj) where T : BZWBasicObject
    {
        AddToRoot(BZWToolsWindow.GetRoot(), gb);
        T      bzw  = gb.AddComponent <T>();
        string name = obj.Name;

        if (name == string.Empty)
        {
            name = obj.ObjectType + "_" + obj.GUID;
        }
        gb.name = name;

        bzw.Setup(obj);

        return(gb);
    }
 public virtual void Setup(BZFlag.Map.Elements.BasicObject elementObject)
 {
     FromBZWObject(elementObject);
     BuildGeometry();
 }
 public virtual void FromBZWObject(BZFlag.Map.Elements.BasicObject obj)
 {
     Name = obj.Name;
     GUID = obj.GUID;
 }