示例#1
0
        public ArtificialIntelligence(UserInterface userInterface, VisualCortex visualCortex)
        {
            if (logicTimer != null)
            {
                logicTimer.Stop();
            }
            // 0 = 40fps when set to 1ms, 8fps screen, 15fps is 7.5fps
            // 1 = 65fps when set to 1ms, 8fps screen, 40fps is 8fps
            // 2 = 1000fps when set to 1ms, 6 fps screen, 60fps is 6.35 fps
            // 3 = 1000fps when set to 1ms, 7.5 fps screen, 60fps is 7.65 fps, 200fps is 8fps
            logicTimer = new ATimer(3, 1, new ATimer.ElapsedTimerDelegate(() => { logic(); }));



            this.userInterface = userInterface;
            this.visualCortex  = visualCortex;

            timerPerformanceStopwatch         = new High_Performance_Timer.Stopwatch();
            screenCapturePerformanceStopWatch = new High_Performance_Timer.Stopwatch();

            basicAI   = new BasicAI();
            autoQueue = new AutoQueueManager();

            logicTimer.Start();
        }
示例#2
0
        public FlameBowl(Vector2 position)
            : base(position)
        {
            burstTimer = new ATimer();
            burstTimer.TimerType = ATimerType.MilliSeconds;
            burstTimer.Interval = 3000;
            burstTimer.Start();

            Rect = new Rectangle((int)Position.X, (int)Position.Y, DEFAULT_WIDTH, DEFAULT_HEIGHT);
        }
示例#3
0
        private void StartAnimation(string status)
        {
            if (!status.Contains("%"))
            {
                status += "%";
            }

            _aStatus = status;
            ATimer.Start();
        }
示例#4
0
        public override void LoadContent(ContentManager Content)
        {
            Texture2D player = Content.Load<Texture2D>("Data\\GFX\\NPCTemp");
            gossipTexture = Content.Load<Texture2D>("Data\\GFX\\GossipBubble");
            animation = new Graphics.Animation(player, Position, 32, 48, 7, 75);
            animation.Depth = 0.89f;
            CollisionRectangle = new Rectangle((int)Position.X, (int)Position.Y, 32, 48);

            idleLoopTimer = new ATimer();
            idleLoopTimer.Interval = 3000;
            idleLoopTimer.Start();
        }