Ejemplo n.º 1
0
        private TextBlock CreateTextBlock(MapObjectType mapObjectType)
        {
            TextBlock textblock = new TextBlock();

            textblock.Text = mapObjectType.ToString();
            return(textblock);
        }
        public static string get()
        {
            MapObjectType type = MapObjectType.Forester;

            type = MapObjectType.Tree | MapObjectType.Warehouse;
            return(type.ToString());
        }
Ejemplo n.º 3
0
        public int AssignObjectID(MapObjectType type)
        {
            switch (type)
            {
            case MapObjectType.Npc: return(++mNpcObjectIDs);

            case MapObjectType.Mob: return(++mMobObjectIDs);

            case MapObjectType.Reactor: return(++mReactorObjectIDs);

            default: throw new ArgumentException(type.ToString());
            }
        }
Ejemplo n.º 4
0
    public GameObject Instantiate(MapObjectType objectType, int sortingOrder)
    {
        string objType = objectType.ToString().Replace("_", "");
        objType = objType.ToLower();

        GameObject prefab = PrefabUtils.GetPrefab(this, objType);

        GameObject go = Instantiate(prefab) as GameObject;

        go.GetComponent<SpriteRenderer>().sortingOrder = sortingOrder;

        return go;
    }
Ejemplo n.º 5
0
        }        ///@property(readwrite,assign) int subTextureId;

        public void SetAtlas(ZAtlas inThing)
        {
            atlas = inThing;

            //return;

            if (myAtlasBillboard == null)
            {
                myAtlasBillboard = new Billboard("mapObject_" + type.ToString() + "_atlas" + atlas.myId.ToString());
            }

            myAtlasBillboard.SetAtlas(atlas);
            myAtlasBillboard.SetDetailsFromAtlas(atlas, 0);
            //	myAtlasBillboard.SetRenderQueue(9000);

            this.ResetMapObject();
        }        ////@property(readwrite,assign) ZAtlas* atlas;
 private bool CompareInput(MapObjectType mapObjectType, string name)
 {
     return(mapObjectType.ToString().ToLower().Contains(name.ToLower()));
 }
Ejemplo n.º 7
0
 public override string ToString()
 {
     return(_type.ToString());
 }