Ejemplo n.º 1
0
        public override void Convert(Apoc3D.Vfs.ResourceLocation source, Apoc3D.Vfs.ResourceLocation dest)
        {
            ModelData mdlData = new ModelData();
            //Model model = new Model(new ResourceHandle<ModelData>(null, true));


        }
Ejemplo n.º 2
0
        public override void UpdateInteract(Apoc3D.GameTime time)
        {
            if (state == State.Opened)
            {
                selectedIndex = -1;


                for (int i = 0; i < 3; i++)
                {
                    Vector2 size = transformedItemBR[i] - transformedItemTL[i];

                    Rectangle rect = new Rectangle((int)transformedItemTL[i].X, (int)transformedItemTL[i].Y, (int)size.X + 1, (int)size.Y + 1);

                    if (Control.IsInBounds(MouseInput.X, MouseInput.Y, ref rect))
                    {
                        selectedIndex = i;
                    }
                }
                if (MouseInput.IsMouseUpLeft)
                {
                    if (selectedIndex != -1)
                    {
                        if (resBallItemSelectedCount[selectedIndex] != 0)
                        {
                            selectedBallType = resBallsItemType[selectedIndex];

                            if (resBallItemSelectedCount[selectedIndex] != resBallItemCount[selectedIndex])
                            {
                                selectedCount = resBallItemSelectedCount[selectedIndex];
                                isCountedThrow = true;
                            }
                            isCancelled = false;
                        }



                    }

                    Close();
                }
                

            }
            else if (state == State.Opening) 
            {
                if (MouseInput.IsMouseDownRight)
                {
                    isOpeningClicked = true;
                }
                if (MouseInput.IsMouseUpRight && isOpeningClicked) 
                {
                    isAllSelected = true;
                    isCancelled = false;
                    Close();
                }
            }
        }
Ejemplo n.º 3
0
        public override void Update(Apoc3D.GameTime time)
        {

            if (state == State.Opened)
            {
                StatisticRBall(false);
            }
            if (state == State.Opening)
            {
                animProgress += time.ElapsedGameTimeSeconds * 4;
                if (animProgress > 1)
                {
                    animProgress = 1;
                    ChangeState(State.Opened);
                }
            }
            else if (state == State.Closing)
            {
                animProgress -= time.ElapsedGameTimeSeconds * 4;
                if (animProgress < 0)
                {
                    animProgress = 0;
                    ChangeState(State.Close);
                }
            }
        }
Ejemplo n.º 4
0
 public override void Update(Apoc3D.GameTime time)
 {
     currentFrame++;
     base.Update(time);
 }
Ejemplo n.º 5
0
 public override void UpdateInteract(Apoc3D.GameTime time)
 {
     if (state == NIGDialogState.Showing)
     {
         replayButton.Update(time);
         backButton.Update(time);
     }
 }
Ejemplo n.º 6
0
 public override void UpdateInteract(Apoc3D.GameTime time)
 {
     if (state == NIGDialogState.Showing)
     {
         resumeButton.UpdateInteract(time);
         restartButton.UpdateInteract(time);
         exitButton.UpdateInteract(time);
     }
 }
Ejemplo n.º 7
0
        public override void Update(Apoc3D.GameTime time)
        {
            if (state == NIGDialogState.MovingOut)
            {
                showPrg -= time.ElapsedGameTimeSeconds * 8;
                if (showPrg < 0)
                {
                    showPrg = 0;
                    state = NIGDialogState.Hiding;
                }
            }
            else if (state == NIGDialogState.MovingIn)
            {
                showPrg += time.ElapsedGameTimeSeconds * 8;
                if (showPrg > 1)
                {
                    showPrg = 1;
                    state = NIGDialogState.Showing;
                }
            }
            if (state == NIGDialogState.Showing)
            {
                replayButton.Update(time);
                backButton.Update(time);

                float dt = (float)time.ElapsedGameTime.TotalSeconds;
                if (clearProgress > 0)
                {
                    clearProgress -= dt;
                }
                else
                {
                    clearProgress = 0;
                }
            }
            if (state == NIGDialogState.Hiding)
            {
                clearProgress = 1.8f;
            }
        }
Ejemplo n.º 8
0
 public override void Update(Apoc3D.GameTime time)
 {
     if (state == NIGDialogState.MovingOut)
     {
         showPrg -= time.ElapsedGameTimeSeconds * 8;
         if (showPrg < 0)
         {
             showPrg = 0;
             state = NIGDialogState.Hiding;
         }
     }
     else if (state == NIGDialogState.MovingIn)
     {
         showPrg += time.ElapsedGameTimeSeconds * 8;
         if (showPrg > 1)
         {
             showPrg = 1;
             state = NIGDialogState.Showing;
         }
     }
     if (state == NIGDialogState.Showing)
     {
         resumeButton.Update(time);
         restartButton.Update(time);
         exitButton.Update(time);
     }
 }
Ejemplo n.º 9
0
        public override void UpdateInteract(Apoc3D.GameTime time)
        {
            base.UpdateInteract(time);

            if (MouseInput.IsMouseUpLeft) 
            {
                Player player = gameLogic.LocalHumanPlayer;

                PlayerArea area = player.Area;
                for (int i = 0; i < area.CityCount; i++)
                {
                    if (area.GetCity(i).IsHomeCity) 
                    {
                        scene.Camera.Longitude = MathEx.Degree2Radian(area.GetCity(i).Longitude);
                        scene.Camera.Latitude = MathEx.Degree2Radian(area.GetCity(i).Latitude);

                        return;
                    }
                }
            }
        }
Ejemplo n.º 10
0
 public override void Update(Apoc3D.GameTime time)
 {
     base.Update(time);
  
 }
Ejemplo n.º 11
0
 public override void UpdateInteract(Apoc3D.GameTime time)
 {
     base.UpdateInteract(time);
     exitButton.UpdateInteract(time);
 }
Ejemplo n.º 12
0
 bool IsIn(int index, int x, int y, out Apoc3D.MathLib.Rectangle rect)
 {
     rect = GetRect(index);
     return rect.Contains(x, y);
 }