Exemplo n.º 1
0
        public void RespawnVehicle(Client player, int vehid, int fix = 0)
        {
            Core.Player thsclient = Core.Player.Find(player);
            bool        flag      = false;

            foreach (EdenVehicle veh in EdenCore.VehicleList)
            {
                if (veh.Vehid == vehid && thsclient.Clientid == veh.Owc)
                {
                    foreach (Core.Player p in EdenCore.PlayerList)
                    {
                        if (veh.Veh == API.getPlayerVehicle(p.Client))
                        {
                            API.sendChatMessageToPlayer(player, "~r~Aracınızı bir oyuncu kullanırken spawn edemezsiniz.");
                            flag = true;
                        }
                        else
                        {
                            API.setEntityPosition(veh.Veh, veh.Parkposition);
                            API.sendChatMessageToPlayer(player, "~g~Aracınız son parkettiğiniz noktaya spawn edilmiştir.");
                            API.setVehicleEngineStatus(veh.Veh, false);
                            API.repairVehicle(veh.Veh);
                            API.setVehicleHealth(veh.Veh, 100.0f);
                            veh.EngineStatus = false;
                            flag             = true;
                        }
                    }
                }
            }
            if (!flag)
            {
                API.sendChatMessageToPlayer(player, "~r~Bu araç size ait değil ya da böyle bir araç bulunmuyor.");
            }
        }
Exemplo n.º 2
0
        public changeNameForm(int id)
        {
            InitializeComponent();
            Id = id;
            p  = Core.Player.GetById(Id);

            textBox1.Text = p.Name;
            label1.Text   = System.Text.RegularExpressions.Regex.Replace(label1.Text, @"%x", Id.ToString());
        }
Exemplo n.º 3
0
        public SelectProfilePictureDialog(int id)
        {
            InitializeComponent();

            Id = id;
            p  = Core.Player.GetById(Id);

            label1.Text       = label1.Text.Replace("%o", Id.ToString());
            pictureBox1.Image = p.PlayerIcon;
            textBox1.Text     = "<Eskisi>";
        }
Exemplo n.º 4
0
        public pointsMenuForm(int id)
        {
            InitializeComponent();

            Id = id;
            p  = Core.Player.GetById(Id);

            label1.Text = Regex.Replace(label1.Text, "%x", Id.ToString());
            label1.Text = Regex.Replace(label1.Text, @"\b%a\b", p.Name);
            label1.Text = Regex.Replace(label1.Text, @"\b%p\b", p.Points.ToString());
        }
Exemplo n.º 5
0
        private void oyundaToolStripMenuItem_CheckedChanged(object sender, EventArgs e)
        {
            Core.Player p = Core.Player.GetById(playerIdFind());

            if ((sender as ToolStripMenuItem).Checked)
            {
                p.setInGame(true);
            }
            else
            {
                p.setInGame(false);
            }
        }
Exemplo n.º 6
0
 public void SetPlayerSkin(Client player, int id, PedHash ped, int fix = 0)
 {
     if (Core.Player.Find(player).Adminlevel > 2)
     {
         Core.Player peh = Core.Player.Find(id);
         if (peh == null)
         {
             API.sendChatMessageToPlayer(player, "~r~Bu oyuncu oyunda değil.");
         }
         else
         {
             API.setPlayerSkin(peh.Client, ped);
         }
     }
 }
Exemplo n.º 7
0
 public void GetPlayer(Client player, int id, int fix = 0)
 {
     if (Core.Player.Find(player).Adminlevel > 2)
     {
         Core.Player peh = Core.Player.Find(id);
         if (peh == null)
         {
             API.sendChatMessageToPlayer(player, "~r~Bu oyuncu oyunda değil.");
         }
         else
         {
             API.setEntityPosition(peh.Client, player.position);
         }
     }
 }
Exemplo n.º 8
0
 // Adds a new player to the world
 public void AddPlayer(string nameOfPlayer, GameObject newPlayer, Position newPosition)
 {
     // Change their name
     newPlayer.identifier.name = nameOfPlayer;
     // Set the position
     newPlayer.ChangePosition(newPosition);
     // Add the player to the world
     AddChild(newPlayer);
     // Create a new player instance for the new player
     Core.Player player = new Core.Player(nameOfPlayer);
     player.controlledGameObject = newPlayer;
     // Add them to the list of players
     players.Add(nameOfPlayer, player);
     // Add them to the corresponding chunk
     GetChunkOrGenerate(newPosition).AddChild(newPlayer);
 }
Exemplo n.º 9
0
        public override void OnCollision(Core.Player player)
        {
            switch (Type)
            {
            case DiamondType.GoldDiamond:
                player.score += 1;
                break;

            case DiamondType.RedDiamond:
                player.score += 2;
                break;

            case DiamondType.GreenDiamond:
                player.score += 3;
                break;
            }
        }
Exemplo n.º 10
0
 private void button3_Click(object sender, EventArgs e)
 {
     if (Program.ControlPanel.AutoPointsCheckBox.Checked)
     {
         Core.Player Z = Core.Player.GetById(playerIdFind());
         foreach (Core.Player p in Core.Player.All)
         {
             if (p != Z)
             {
                 p.addPoints((uint)(ViewerPanel.ViewerClass.currentPoints / 2));
             }
         }
     }
     Core.Timing.Pause(false);
     Core.Timing.StopTimer();
     Close();
 }
Exemplo n.º 11
0
 public void KickPlayer(Client player, int id, string reason, int fix = 0)
 {
     if (Core.Player.Find(player).Adminlevel >= 2)
     {
         Core.Player peh = Core.Player.Find(id);
         if (peh == null)
         {
             API.sendChatMessageToPlayer(player, "~r~Bu oyuncu oyunda değil.");
         }
         else
         {
             string info = "~r~(( ~w~" + peh.Character.Name + " adlı oyuncu " + reason + " nedeniyle " + Core.Player.Find(player).Character.Name + " tarafından sunucudan atıldı. ~r~))";
             API.sendChatMessageToAll(info);
             peh.Client.kick();
         }
     }
 }
Exemplo n.º 12
0
 public void GotoVehicle(Client player, int vehid, int fix = 0)
 {
     Core.Player sender = Core.Player.Find(player);
     if (!sender.Equals(null) && sender.Adminlevel > 2)
     {
         int turn = EdenVehicle.FindVehicle(vehid);
         if (turn != -1)
         {
             API.setEntityPosition(player, API.getEntityPosition(EdenCore.VehicleList[turn].Veh));
         }
         else
         {
             API.sendChatMessageToPlayer(player, "Böyle bir araç bulunmuyor.");
         }
     }
     else
     {
         // not admin
     }
 }
Exemplo n.º 13
0
 public void CreateVehicle(Client player, int c1, int c2, VehicleHash hash, int ownerid, int fix = 0)
 {
     Core.Player sender = Core.Player.Find(player);
     if (!sender.Equals(null) && sender.Adminlevel > 3)
     {
         Core.Player localp = Core.Player.Find(ownerid);
         if (localp != null)
         {
             EdenCore.VehicleList.Add(new EdenVehicle(hash, EdenCore.VehicleList.Count, API.createVehicle(hash, new Vector3(player.position.X + 5, player.position.Y, player.position.Z), player.rotation, c1, c2), ownerid, c1, c2, localp.Character.Name, player.position, true));
             API.sendChatMessageToPlayer(player, ownerid.ToString() + " ID'li oyuncuya " + hash.ToString() + " model bir araç verdiniz.");
         }
         else
         {
             API.sendChatMessageToPlayer(player, "Bu ID'de bir oyuncu bulunamadı.");  // replace error message function
         }
     }
     else
     {
         // not admin
     }
 }
Exemplo n.º 14
0
 public override void OnCollision(Core.Player player)
 {
 }
Exemplo n.º 15
0
        /// <summary>
        /// Starts up a game engine for the specified map
        /// </summary>
        /// <param name="mapName">The name given to the map in the file system</param>
        public Engine(String mapName)
        {
            if (instance != null)
            {
                #region Cleanup the old instance
                instance = null;
                map = null;
                bullets = null;
                explosions = null;
                lua = null;
                sound = null;
                player = null;
				boss = null;
                System.GC.Collect();
                #endregion
            }
            instance = this;
            sound = SnailsPace.soundManager;
            
            // Stuff needed by maps
            loadFonts();
            
            // Initialize Lua, the Player, and the Map
            lua = new GameLua(mapName);
            map = new Map(mapName);

            // Setup lists for objects that will be used later
            bullets = new List<Bullet>();
            explosions = new List<Explosion>();
            collidingObjects = new List<GameObject>();

            // Load the Fonts, Sprites, and some helper Game Objects that will be needed.
            loadHUD();
            setupPauseOverlay();
            setupMapBounds();

            // Initialize the Renderer
            setupGameRenderer();
        }
Exemplo n.º 16
0
        // Update
        public override void Update()
        {
            base.Update();

            #region If dead, die
            if (specialProperties["isDeceased"] == "TRUE")
            {
                return;
            }
            // If out of health, die
            if (float.Parse(body.specialProperties["health"], System.Globalization.CultureInfo.InvariantCulture) <= 0f || float.Parse(head.specialProperties["health"], System.Globalization.CultureInfo.InvariantCulture) <= 0f)
            {
                specialProperties["isDeceased"] = "TRUE";
                identifier.descriptiveAdjectives.Add("dead");
                specialProperties["stance"] = StanceToString(Stances.LAYING);
                // Notify everyone
                attachedApplication.server.world.SendMessageToPosition("The " + identifier.fullName + " falls to the ground, dead!", position);
                return;
            }
            #endregion

            #region Update variables
            specialProperties["weight"] = weight.ToString();
            #endregion

            #region Look around for threats

            // Add players
            foreach (KeyValuePair <string, Core.Player> playerEntry in attachedApplication.server.world.players)
            {
                // If this player is in our chunk
                if (playerEntry.Value.controlledGameObject.position == position)
                {
                    gameObjectsPercievedAsThreat.Add(playerEntry.Value.controlledGameObject);
                }
            }

            #endregion

            #region Run state based AI
            // Use a while true loop so we can break the code when needed
            while (true)
            {
                if (AIState == AIStates.HUNGRY)
                {
                    // First, look for any nearby creatures, and attack them if they weigh less than us
                    List <GameObject> nearbyCreaturesThatWeighLess = new List <GameObject>();
                    // Get all the children of this chunk
                    List <GameObject> children = parent.GetAllChildren();
                    // Go through the children and find all the ones that weigh less than us
                    foreach (GameObject child in children)
                    {
                        // If a creature
                        if (typeof(Creature).IsAssignableFrom(child.type))
                        {
                            // And it weighs less than us
                            if (float.Parse(child.specialProperties["weight"], System.Globalization.CultureInfo.InvariantCulture) < float.Parse(specialProperties["weight"], System.Globalization.CultureInfo.InvariantCulture) &&
                                child.specialProperties["isDeceased"] != "TRUE")
                            {
                                nearbyCreaturesThatWeighLess.Add(child);
                            }
                        }
                    }

                    // If there are nearby creatures that weigh less than us, attack them
                    if (nearbyCreaturesThatWeighLess.Count > 0)
                    {
                        AIState = AIStates.ATTACKING;
                        gameObjectKnownToBeHostile = nearbyCreaturesThatWeighLess.First();
                    }

                    // Look if there is any nearby plants to eat
                    List <GameObject> plantsToEat = new List <GameObject>();
                    string[]          namesOfFood = { "grass", "root", "fern" };
                    // Go through the children and find all the ones with the name of the food in it's name
                    foreach (GameObject child in children)
                    {
                        foreach (string food in namesOfFood)
                        {
                            if (child.identifier.fullName.Contains(food))
                            {
                                plantsToEat.Add(child);
                                break;
                            }
                        }
                    }

                    // If so, eat them
                    if (plantsToEat.Count > 0)
                    {
                        // If content and has food, possibly sleep
                        if (random.Next(0, 120) == 0)
                        {
                            // Change the stance to laying down
                            specialProperties["stance"] = StanceToString(Stances.LAYING);
                            // Notify everyone
                            attachedApplication.server.world.SendMessageToPosition(Processing.Describer.GetArticle(identifier.fullName).ToUpper() + " " + identifier.fullName + " lays down to sleep.", position);
                            // Go into the sleeping state
                            AIState = AIStates.SLEEPING;
                            // Set the sleeping timer
                            sleepingTimer = random.Next(60, 120);
                            // Set the adjective
                            identifier.descriptiveAdjectives.Add("sleeping");
                            break;
                        }
                        // Every so often eat the plants
                        else if (random.Next(0, 60) == 0)
                        {
                            // Notify everyone
                            attachedApplication.server.world.SendMessageToPosition(Processing.Describer.GetArticle(identifier.fullName).ToUpper() + " " + identifier.fullName + " eats the " + plantsToEat.First().identifier.fullName + "...", position);
                        }
                        // Boar grunting
                        else if (random.Next(1, 60) == 1)
                        {
                            // Notify everyone
                            attachedApplication.server.world.SendMessageToPosition(Processing.Describer.GetArticle(identifier.fullName).ToUpper() + " " + identifier.fullName + " lets out a deep, threatening grunt...", position);
                        }
                        // Boar looks at random nearby player
                        else if (random.Next(1, 60) == 1)
                        {
                            // List of nearby players
                            List <Core.Player> nearbyPlayers = new List <Core.Player>();
                            // Get the nearby players
                            foreach (KeyValuePair <string, Core.Player> playerEntry in attachedApplication.server.world.players)
                            {
                                // If this player is in our chunk
                                if (playerEntry.Value.controlledGameObject.position == position)
                                {
                                    nearbyPlayers.Add(playerEntry.Value);
                                }
                            }
                            // If someone is nearby, look at them
                            if (nearbyPlayers.Count > 0)
                            {
                                // Choose a random person nearby to look at
                                Core.Player playerToLookAt = nearbyPlayers.ToArray()[random.Next(0, nearbyPlayers.Count)];
                                attachedApplication.server.world.SendMessageToPosition(
                                    Processing.Describer.GetArticle(identifier.fullName).ToUpper() + " " + identifier.fullName + " looks at you with sinister eyes...",
                                    playerToLookAt.name,
                                    Processing.Describer.GetArticle(identifier.fullName).ToUpper() + " " + identifier.fullName + " looks at " + playerToLookAt.name + " with sinister eyes...",
                                    position);
                            }
                        }
                    }
                    // If not, go to a random nearby chunk to find food
                    else if (attachedApplication.server.world.players.Count > 0)
                    {
                        // Decide a direction to go
                        Direction desiredDirection = Direction.IntToDirection(random.Next(0, 7));
                        Position  newPosition      = new Position(position.x + desiredDirection.x, position.y + desiredDirection.y, position.z + desiredDirection.z);
                        // Choose a random direction until we get one where there is a valid chunk at our destination
                        while (attachedApplication.server.world.GetChunk(newPosition) == null)
                        {
                            desiredDirection = Direction.IntToDirection(random.Next(0, 7));
                            newPosition      = new Position(position.x + desiredDirection.x, position.y + desiredDirection.y, position.z + desiredDirection.z);
                        }
                        // Notify everyone in this chunk and destination chunk
                        attachedApplication.server.world.SendMessageToPosition(Processing.Describer.GetArticle(identifier.fullName).ToUpper() + " " + identifier.fullName + " trots " + Direction.DirectionToString(desiredDirection) + " in search of food...", position);
                        attachedApplication.server.world.SendMessageToPosition(Processing.Describer.GetArticle(identifier.fullName).ToUpper() + " " + identifier.fullName + " trots along from the " + Direction.DirectionToString(Direction.GetOpposite(desiredDirection)) + " in search of food...", newPosition);
                        // Move the object
                        attachedApplication.server.world.MoveObject(ID, newPosition);
                    }
                }
                else if (AIState == AIStates.SLEEPING)
                {
                    // Keep the sleeping timer going
                    sleepingTimer--;
                    // If awake
                    if (sleepingTimer <= 0)
                    {
                        // Stand back up
                        specialProperties["stance"] = StanceToString(Stances.STANDING);
                        // Get rid of the sleeping adjective
                        identifier.descriptiveAdjectives.Remove("sleeping");
                        // Go back to being hungry
                        AIState = AIStates.HUNGRY;
                        // Notify everyone
                        attachedApplication.server.world.SendMessageToPosition(Processing.Describer.GetArticle(identifier.fullName).ToUpper() + " " + identifier.fullName + " wakes from it's slumber and stands up.", position);
                        break;
                    }
                }
                else if (AIState == AIStates.ATTACKING)
                {
                    // TODO: Add a decision tree where the boar decides whether or not to attack based on it's own health, whether or not it has horns, and if it weighs enough to stand a chance to fight

                    // If we're not currently in the middle of another action, attack!
                    if (!currentlyInTheMiddleOfPerformingAction)
                    {
                        // Set the bool that we are currently in the middle of an action
                        currentlyInTheMiddleOfPerformingAction = true;

                        // Notify everyone in the chunk

                        // If we are fighting a player, send a message to the player being attacked
                        if (gameObjectKnownToBeHostile.specialProperties.ContainsKey("isPlayer"))
                        {
                            attachedApplication.server.world.SendMessageToPosition("The " + identifier.fullName + " charges at you! It will hit you in " + (1 / speed * 20f).ToString() + " seconds!", gameObjectKnownToBeHostile.identifier.name, "A " + identifier.fullName + " charges at " + gameObjectKnownToBeHostile.identifier.name + "!", position);
                        }
                        // Otherwise, we are not fighting another player, so we can format the message differently
                        else
                        {
                            attachedApplication.server.world.SendMessageToPosition("A " + identifier.fullName + " charges at " + Processing.Describer.GetArticle(gameObjectKnownToBeHostile.identifier.fullName) + " " + gameObjectKnownToBeHostile.identifier.fullName, position);
                        }

                        // Create a new thread where we wait for a bit, then impact the hostile object and do damage
                        new Thread(() =>
                        {
                            Thread.CurrentThread.IsBackground = true;
                            // Wait for the set amount of time based on how fast the boar is
                            Thread.Sleep((int)(1 / speed * 20f * 1000f));

                            // Check if the hostile object is still there, because they might have fled
                            // TODO: For some non peaceful animals, they should go into a pursuit state and chase down the hostile.
                            if (gameObjectKnownToBeHostile.position != position || gameObjectKnownToBeHostile.specialProperties["isDeceased"] == "TRUE")
                            {
                                AIState = AIStates.HUNGRY;
                                currentlyInTheMiddleOfPerformingAction = false;
                            }
                            else
                            {
                                // We are now in the hostile object's proximity
                                gameObjectsInProximity.Add(gameObjectKnownToBeHostile);
                                gameObjectKnownToBeHostile.gameObjectsInProximity.Add(this);
                                gameObjectKnownToBeHostile.OnEnterProximity(this);
                                // Calculate damage done to hostile object
                                float damageDealt = weight * speed * 0.01f;
                                // If we have weapons, deal 2x more damage + bleeding effect, which will be calculated in the OnStrikeThisGameObjectWithGameObject function
                                if (FindChildrenWithName("tusk").Count > 0)
                                {
                                    damageDealt *= 2 * FindChildrenWithName("tusk").Count;
                                    gameObjectKnownToBeHostile.OnStrikeThisGameObjectWithGameObject(this, FindChildrenWithName("tusk").First(), damageDealt);
                                    // If we are fighting a player, send a message to the player being attacked
                                    if (gameObjectKnownToBeHostile.specialProperties.ContainsKey("isPlayer"))
                                    {
                                        attachedApplication.server.world.SendMessageToPosition(
                                            "The " + identifier.fullName + " rammed into you and gored you with it's tusks, dealing " + damageDealt.ToString() + " damage!",
                                            gameObjectKnownToBeHostile.identifier.name,
                                            "A " + identifier.fullName + " rammed into " + gameObjectKnownToBeHostile.identifier.name + " and gored them with it's tusks!",
                                            position);
                                    }
                                    else
                                    {
                                        attachedApplication.server.world.SendMessageToPosition(
                                            "A " + identifier.fullName + " rammed into " + Processing.Describer.GetArticle(gameObjectKnownToBeHostile.identifier.fullName) + " " + gameObjectKnownToBeHostile.identifier.fullName + " and gored it with it's tusks!",
                                            position);
                                    }
                                }
                                // Otherwise, ram into the hostile object and do blunt force damage with whole body
                                else
                                {
                                    gameObjectKnownToBeHostile.OnStrikeThisGameObjectWithGameObject(this, this, damageDealt);
                                    // If we are fighting a player, send a message to the player being attacked
                                    if (gameObjectKnownToBeHostile.specialProperties.ContainsKey("isPlayer"))
                                    {
                                        attachedApplication.server.world.SendMessageToPosition(
                                            "The " + identifier.fullName + " rammed into you, dealing " + damageDealt.ToString() + " damage!",
                                            gameObjectKnownToBeHostile.identifier.name,
                                            "A " + identifier.fullName + " rammed into " + gameObjectKnownToBeHostile.identifier.name + "!",
                                            position);
                                    }
                                    else
                                    {
                                        attachedApplication.server.world.SendMessageToPosition(
                                            "A " + identifier.fullName + " rammed into " + Processing.Describer.GetArticle(gameObjectKnownToBeHostile.identifier.fullName) + " " + gameObjectKnownToBeHostile.identifier.fullName + "!",
                                            position);
                                    }
                                }

                                // Turn off the bool that says we are currently in the middle of an action
                                currentlyInTheMiddleOfPerformingAction = false;
                            }
                        }).Start();
                    }
                }
                break;
            }
            #endregion
        }
Exemplo n.º 17
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);
            RequestWindowFeature(WindowFeatures.NoTitle);
            if (SupportedOpenGLVersion() >= 3)
            {
                // SetContentView(new LibPaintingView(ApplicationContext, null));

                // Inject Fusee.Engine.Base InjectMe dependencies
                IO.IOImp = new IOImp(ApplicationContext);

                var fap = new Fusee.Base.Imp.Android.ApkAssetProvider(ApplicationContext);
                fap.RegisterTypeHandler(
                    new AssetHandler
                {
                    ReturnedType = typeof(Font),
                    Decoder      = (string id, object storage) =>
                    {
                        if (!Path.GetExtension(id).Contains("ttf", StringComparison.OrdinalIgnoreCase))
                        {
                            return(null);
                        }
                        return(new Font {
                            _fontImp = new FontImp((Stream)storage)
                        });
                    },
                    Checker = id => Path.GetExtension(id).Contains("ttf", StringComparison.OrdinalIgnoreCase)
                });
                fap.RegisterTypeHandler(
                    new AssetHandler
                {
                    ReturnedType = typeof(SceneContainer),
                    Decoder      = (string id, object storage) =>
                    {
                        if (!Path.GetExtension(id).Contains("fus", StringComparison.OrdinalIgnoreCase))
                        {
                            return(null);
                        }

                        return(FusSceneConverter.ConvertFrom(ProtoBuf.Serializer.Deserialize <FusFile>((Stream)storage)));
                    },
                    Checker = id => Path.GetExtension(id).Contains("fus", StringComparison.OrdinalIgnoreCase)
                });
                AssetStorage.RegisterProvider(fap);

                var app = new Core.Player();

                // Inject Fusee.Engine InjectMe dependencies (hard coded)
                RenderCanvasImp rci = new RenderCanvasImp(ApplicationContext, null, delegate { app.Run(); });
                app.CanvasImplementor  = rci;
                app.ContextImplementor = new RenderContextImp(rci, ApplicationContext);

                SetContentView(rci.View);

                Engine.Core.Input.AddDriverImp(
                    new Fusee.Engine.Imp.Graphics.Android.RenderCanvasInputDriverImp(app.CanvasImplementor));
                // Engine.Core.Input.AddDriverImp(new Fusee.Engine.Imp.Graphics.Android.WindowsTouchInputDriverImp(app.CanvasImplementor));
                // Deleayed into rendercanvas imp....app.Run() - SEE DELEGATE ABOVE;
            }
            else
            {
                Toast.MakeText(ApplicationContext, "Hardware does not support OpenGL ES 3.0 - Aborting...", ToastLength.Long);
                Log.Info("@string/app_name", "Hardware does not support OpenGL ES 3.0 - Aborting...");
            }
        }
Exemplo n.º 18
0
 public override void OnCollision(Core.Player player)
 {
     Costam.collectEffect.Play();
     player.score += 1;
 }
Exemplo n.º 19
0
 public List <Core.Units.Character> ReturnChars(Core.Player _player)
 {
     return(battleChars);
 }
Exemplo n.º 20
0
 public override void OnCollision(Core.Player player)
 {
     Costam.collisionEffect.Play();
     player.health -= 1;
     player.EnableGodMode();
 }
Exemplo n.º 21
0
        private void Updater_Elapsed(object sender, System.Timers.ElapsedEventArgs e)
        {
            if (!Core.Threads.ViewerPanelThread.IsAlive)
            {
                Close();
                return;
            }
            Invoke((MethodInvoker)
                   (
                       () =>
            {
                //Timing
                if (Core.Timing.TimeNow != -1)
                {
                    TimeLabel.Text = Core.Timing.TimeNow.ToString();
                }
                else
                {
                    TimeLabel.Text = "";
                }
                //Bir X
                if (ViewerClass.current != null)
                {
                    switch (ViewerClass.current.Type)
                    {
                    case Core.Questions.TypeEnum.AutoEquation | Core.Questions.TypeEnum.UserEquation:
                        TypeLabel.Text = "Bir İşlem";
                        break;

                    case Core.Questions.TypeEnum.DictionaryWord | Core.Questions.TypeEnum.UserWord:
                        TypeLabel.Text = "Bir Kelime";
                        break;
                    }
                }
                //chars
                if (ViewerClass.viewChars != null)
                {
                    A.Text = ViewerClass.viewChars[0].ToString();
                    B.Text = ViewerClass.viewChars[1].ToString();
                    C.Text = ViewerClass.viewChars[2].ToString();
                    D.Text = ViewerClass.viewChars[3].ToString();
                    E.Text = ViewerClass.viewChars[4].ToString();
                    F.Text = ViewerClass.viewChars[5].ToString();
                    G.Text = ViewerClass.viewChars[6].ToString();
                    H.Text = ViewerClass.viewChars[7].ToString();
                }

                panel10.Visible = ViewerClass.views[0];
                panel11.Visible = ViewerClass.views[1];
                panel8.Visible = ViewerClass.views[2];
                panel15.Visible = ViewerClass.views[3];
                panel12.Visible = ViewerClass.views[4];
                panel7.Visible = ViewerClass.views[5];
                panel14.Visible = ViewerClass.views[6];
                panel13.Visible = ViewerClass.views[7];
                //points
                PointLabel.Text = (Core.Timing.Running) ? Core.Questions.GetDeltaWorth((int)ViewerClass.currentPoints, (int)Core.Timing.TimeNow, (int)Core.Timing.StartLenght).ToString() : "";
                panel9.Visible = ViewerClass.viewPoints;
                //Joker card
                jokerPanel.Visible = ViewerClass.viewJoker && ViewerClass.actualJoker;

                //Players
                if (Core.Player.All.Count <= 3)
                {
                    for (int i = 0; i < 3; i++)
                    {
                        Core.Player p = Core.Player.GetById(i + 1);

                        if (p != null)
                        {
                            if (i == 0)
                            {
                                NameX.Text = p.Name;
                                PointsX.Text = p.Points.ToString();
                                PictureX.Image = p.PlayerIcon;
                                PanelX.Visible = true;
                            }
                            if (i == 1)
                            {
                                NameY.Text = p.Name;
                                PointsY.Text = p.Points.ToString();
                                PictureY.Image = p.PlayerIcon;
                                PanelY.Visible = true;
                            }
                            if (i == 2)
                            {
                                NameZ.Text = p.Name;
                                PointsZ.Text = p.Points.ToString();
                                PictureZ.Image = p.PlayerIcon;
                                PanelZ.Visible = true;
                            }
                        }
                        else
                        {
                            if (i == 0)
                            {
                                PanelX.Visible = false;
                            }
                            if (i == 1)
                            {
                                PanelY.Visible = false;
                            }
                            if (i == 2)
                            {
                                PanelZ.Visible = false;
                            }
                        }
                    }
                }
                else
                {
                    if (PlayerAnimationFrame % 1 == 0)
                    {
                        for (int i = 0; i < 3; i++)
                        {
                            Core.Player p;
                            if (PlayerAnimationFrame == 0)
                            {
                                p = Core.Player.GetById(i + 1);
                            }
                            else
                            {
                                p = Core.Player.GetById((i + 1) * ((int)PlayerAnimationFrame));
                            }

                            if (p != null)
                            {
                                if (i == 0)
                                {
                                    NameX.Text = p.Name;
                                    PointsX.Text = p.Points.ToString();
                                    PictureX.Image = p.PlayerIcon;
                                    PanelX.Visible = true;
                                }
                                if (i == 1)
                                {
                                    NameY.Text = p.Name;
                                    PointsY.Text = p.Points.ToString();
                                    PictureY.Image = p.PlayerIcon;
                                    PanelY.Visible = true;
                                }
                                if (i == 2)
                                {
                                    NameZ.Text = p.Name;
                                    PointsZ.Text = p.Points.ToString();
                                    PictureZ.Image = p.PlayerIcon;
                                    PanelZ.Visible = true;
                                }
                            }
                            else
                            {
                                if (i == 0)
                                {
                                    PanelX.Visible = false;
                                }
                                if (i == 1)
                                {
                                    PanelY.Visible = false;
                                }
                                if (i == 2)
                                {
                                    PanelZ.Visible = false;
                                }
                            }
                        }
                    }
                    if (PlayerAnimationFrame > ((Core.Player.All.Count + (3 - (Core.Player.All.Count % 3))) / 3))
                    {
                        PlayerAnimationFrame = 0;
                    }
                    PlayerAnimationFrame = PlayerAnimationFrame + 0.1f;
                }
            }
                   ));
        }