Ejemplo n.º 1
0
 public override void SpawnCreatures()
 {
     base.SpawnCreatures();
     if (this.PlayMode)
     {
         int num = -1;
         List <SandboxEditor.PlacedIconData> list = SandboxEditor.LoadConfiguration(ref num, this.arenaSitting.GetCurrentLevel);
         for (int i = 0; i < list.Count; i++)
         {
             this.SpawnEntity(list[i]);
         }
     }
     else
     {
         bool flag = false;
         if (this.arenaSitting.players.Count < 1)
         {
             flag = true;
             this.arenaSitting.players.Add(new ArenaSitting.ArenaPlayer(0));
         }
         for (int j = 0; j < this.arenaSitting.players.Count; j++)
         {
             AbstractCreature abstractCreature = new AbstractCreature(this.game.world, StaticWorld.GetCreatureTemplate(CreatureTemplate.Type.Overseer), null, new WorldCoordinate(0, 0, -50, 0), this.game.GetNewID());
             this.game.world.GetAbstractRoom(0).AddEntity(abstractCreature);
             abstractCreature.abstractAI.SetDestinationNoPathing(new WorldCoordinate(0, -1, -1, UnityEngine.Random.Range(0, this.game.world.GetAbstractRoom(0).nodes.Length)), true);
             (abstractCreature.abstractAI as OverseerAbstractAI).ownerIterator = 10 + this.arenaSitting.players[j].playerNumber;
         }
         if (flag)
         {
             this.arenaSitting.players.Clear();
         }
     }
 }
Ejemplo n.º 2
0
        private void HookBimWindow(ProjectItem pi)
        {
            try
            {
                if (pi == null || pi.Name == null)
                {
                    return;
                }
                string sFileName = pi.Name.ToLower();
                if (!sFileName.EndsWith(".bim"))
                {
                    return;
                }

                UIHierarchy solExplorer = this.ApplicationObject.ToolWindows.SolutionExplorer;
                if (((System.Array)solExplorer.SelectedItems).Length != 1)
                {
                    return;
                }

                UIHierarchyItem hierItem = ((UIHierarchyItem)((System.Array)solExplorer.SelectedItems).GetValue(0));

                SandboxEditor editor = TabularHelpers.GetTabularSandboxEditorFromProjectItem(pi, false);
                if (editor == null)
                {
                    return;
                }
#if !DENALI && !SQL2014
                // if the sandbox is in the new tabular metadata mode (JSON) then exit here
                if (editor.Sandbox.IsTabularMetadata)
                {
                    return;
                }
#endif
                Microsoft.AnalysisServices.Common.ERDiagram diagram = TabularHelpers.GetTabularERDiagramFromSandboxEditor(editor);
                if (diagram != null)
                {
                    SetupContextMenu(diagram);
                }
                else
                {
                    if (!_hookedSandboxEditors.Contains(editor))
                    {
                        editor.DiagramObjectsSelected += new EventHandler <ERDiagramSelectionChangedEventArgs>(editor_DiagramObjectsSelected);
                        _hookedSandboxEditors.Add(editor);
                    }
                }
            }
            catch (System.Exception ex)
            {
                MessageBox.Show(ex.Message + "\r\n" + ex.StackTrace, "BIDS Helper - Error");
            }
        }
        private void HookBimWindow(ProjectItem pi)
        {
            try
            {
                if (pi == null || pi.Name == null)
                {
                    return;
                }
                string sFileName = pi.Name.ToLower();
                if (!sFileName.EndsWith(".bim"))
                {
                    return;
                }

                SandboxEditor editor = TabularHelpers.GetTabularSandboxEditorFromProjectItem(pi, false);
                if (editor == null)
                {
                    return;
                }
                Microsoft.AnalysisServices.Common.ERDiagram diagram = TabularHelpers.GetTabularERDiagramFromSandboxEditor(editor);
                if (diagram != null)
                {
                    SetupContextMenu(diagram);
                }
                else
                {
                    if (!_hookedSandboxEditors.Contains(editor))
                    {
                        editor.DiagramObjectsSelected += new EventHandler <ERDiagramSelectionChangedEventArgs>(editor_DiagramObjectsSelected);
                        _hookedSandboxEditors.Add(editor);
                    }
                }
            }
            catch (System.Exception ex)
            {
                MessageBox.Show(ex.Message + "\r\n" + ex.StackTrace, "BIDS Helper - Error");
            }
        }
 public TRef(SandboxEditor<TBox> shaper, int x, int y)
 {
     this.editor = shaper;
     this.x = (short)x;
     this.y = (short)y;
 }
 public TRef(SandboxEditor <TBox> shaper, int x, int y)
 {
     this.editor = shaper;
     this.x      = (short)x;
     this.y      = (short)y;
 }