예제 #1
0
 private void MainViewFinish()
 {
     mIsMainWindow = true;
     TryLogin2MainScene();
     if (mIsMainMode == false)
     {
         GTimer.In(2.0f, LoadMainModeTimeOut);
     }
 }
예제 #2
0
파일: AnimationStrip.cs 프로젝트: gmich/Gem
        public AnimationStrip(AnimationStripSettings settings)
        {
            this.Settings    = settings;
            currentFrame     = settings.StartFrame - 1;
            tileSheetColumns = ((settings.TileSheetWidth - 1) / settings.FrameWidth) + 1;
            tileSheetRows    = ((settings.TileSheetHeight - 1) / settings.FrameHeight) + 1;
            tileSheetCount   = settings.LastFrame;

            frameUpdateTimer = new GTimer(settings.FrameDelay, settings.FrameDelay, NextFrame);
        }
예제 #3
0
 public GObject(eGMyObject eObj, eGStatus estt, Vector2 position, GSprite sprite)
 {
     this.m_ID       = eObj;
     this.STATUS     = estt;
     this.POSITION   = position;
     this.SPRITE     = new GSprite(sprite);
     this.SIZE       = new Point(SPRITE.Size.X, SPRITE.Size.Y);
     this.TOTALFRAME = sprite.TotalFrame;
     this.Time       = new GTimer();
     m_Origin        = new Vector2(this.POSITION.X + SIZE.X / 2, this.POSITION.Y + SIZE.Y / 2);
 }
예제 #4
0
        private void TryLogin2MainScene()
        {
            if (mIsMainWindow == false || mIsMainMode == false)
            {
                return;
            }
            GTimer.CancelAll("LoadMainModeTimeOut");
            WindowManager.GetSingleton().DestoryWidowByName(LoginView.VIEW_KEY);
            PlayerManager.GetSingleton().pHero.NofityPlayerEvent(new Air2000.Event((int)PlayerEventType.PE_NotifyEnterMainScene));

            this.NotifySceneEvent(new Air2000.Event((int)SceneEventType.SE_CompletedLoading));
        }
예제 #5
0
        public StateMachine()
        {
            this.reader  = null;
            this.astRoot = null;
            if (RemoteTask.FileExist(Settings.TaskFile))
            {
                this.reader = RemoteTask.GetFile(Settings.TaskFile);
            }
            else
            {
                MessageBox.Show(string.Format("Your selected task file wasn't found:\n{0}", Settings.TaskFile));
                this.StopAll("");
            }

            if (this.reader != null)
            {
                this.pproc      = new Preprocessor(this.reader);
                this.taskParser = new TaskParser(new StreamReader(this.pproc.ProcessedStream));
                this.astRoot    = this.taskParser.ParseTask(null);
                this.reader.Close();
            }
            else
            {
                this.StopAll("TextReader was null. File not found?");
            }
            this.root = new RootNode();
            this.root.AddTask(this.astRoot);
            this.root.BindSymbols(); // Just to make it a tad faster

            this.taskQueue     = new Stack <Task>();
            this.activityQueue = new Stack <Activity>();
            this.rootTask      = TaskCreator.CreateTaskFromNode(this.root, null);
            if (this.rootTask == null)
            {
                this.StopAll("No root task");
            }
            TaskInfo.Root = this.rootTask;
            TaskCreator.CreateTreeFromTasks(this.rootTask);
            this.activity         = null;
            this.taskTimer        = new GTimer(300); //300
            this.nothingToDoTimer = new GTimer(3 * 1000);
            this.tick             = new GTimer(100);
        }
예제 #6
0
 private void LoadMainModeTimeOut()
 {
     GTimer.CancelAll("LoadMainModeTimeOut");
     mIsMainMode = true;
     TryLogin2MainScene();
 }
예제 #7
0
 private void MianModeEnd(Air2000.Event varEvent)
 {
     GTimer.CancelAll("LoadMainModeTimeOut");
     mIsMainMode = true;
     TryLogin2MainScene();
 }