Example #1
0
        protected void CreateGameAssetView(AbstractGameAsset asset)
        {
            lock (m_buyPointViews)
            {
                GameAssetView gav = GetBuyPointView(asset.BuyPointUuid).CreateGameAssetView(asset);
                asset.Position = gav.RootPart.AbsolutePosition;

                lock (m_gameAssetViews)
                    m_gameAssetViews.Add(gav.Uuid, gav);
            }
        }
Example #2
0
        public Field RemoveGameAssetView(AbstractGameAsset asset)
        {
            Field f = null;

            lock (m_gameAssetViews)
            {
                GameAssetView gav = GetGameAssetView(asset.Uuid);
                Vector3       pos = gav.RootPart.AbsolutePosition;
                gav.Close();

                lock (m_buyPointViews)
                {
                    f = asset.Field;
                    BuyPoint bp = f.BuyPoint;
                    GetBuyPointView(bp.Uuid).CreateFieldView(f, pos);
                }
            }

            f.TriggerChanged();

            return(f);
        }