コード例 #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
ファイル: StateMachine.cs プロジェクト: jontoloid/TaskEngine
        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();
 }