Exemple #1
0
    public static void DrawHumans()
    {
        IEnumerator zEnum = GameObject.Find("MultiplayerManager").GetComponent <FengGameManagerMKII>().getPlayers().GetEnumerator();

        while (zEnum.MoveNext())
        {
            HERO aHERO = zEnum.Current as HERO;
            if (!aHERO ||
                !aHERO.photonView)
            {
                continue;
            }
            if (!aHERO.photonView.owner.isLocal)
            {
                foreach (Collider collider in aHERO.GetComponentsInChildren <Collider>()) // humans
                {
                    if (collider.name == "Controller_Body")
                    {
                        Vector3 Headpos = new Vector3(0, collider.bounds.extents.y, 0);
                        if (GlobalVars.Bools[4])
                        {
                            CustomCanvas.DrawBounds(collider.bounds.center, collider.bounds.extents, GlobalVars.Colors[4]);
                        }

                        if (aHERO.photonView != null)
                        {
                            if (aHERO.photonView.owner != null)
                            {
                                if (GlobalVars.Bools[5] || GlobalVars.Bools[6])
                                {
                                    aHERO.myNetWorkName.GetComponent <UILabel>().text = string.Empty;
                                }

                                string Playername = RemoveTags((string)aHERO.photonView.owner.customProperties[PhotonPlayerProperty.name]);
                                string Guildname  = RemoveTags((string)aHERO.photonView.owner.customProperties[PhotonPlayerProperty.guildName]);
                                if (!GlobalVars.Bools[5] && !GlobalVars.Bools[6] && aHERO.myNetWorkName.GetComponent <UILabel>().text == string.Empty)
                                {
                                    if (Guildname != string.Empty)
                                    {
                                        aHERO.myNetWorkName.GetComponent <UILabel>().text = "[FFFF00]" + Guildname + "\n[FFFFFF]" + Playername;
                                    }
                                    else
                                    {
                                        aHERO.myNetWorkName.GetComponent <UILabel>().text = Playername;
                                    }
                                }


                                if (GlobalVars.Bools[5])
                                {
                                    DrawLabel(collider.bounds.center + Headpos, Playername, GlobalVars.Colors[5], +20);
                                }

                                if (GlobalVars.Bools[6])
                                {
                                    DrawLabel(collider.bounds.center + Headpos, Guildname, GlobalVars.Colors[6], GlobalVars.Bools[5] ? +35 : +20);
                                }

                                //wtf am i doing here...... uhhhhh... k
                                if (GlobalVars.Bools[7])
                                {
                                    DrawLabel(collider.bounds.center + Headpos, aHERO.photonView.ownerId.ToString(), GlobalVars.Colors[7],
                                              GlobalVars.Bools[5] ? GlobalVars.Bools[6] ? Guildname != string.Empty ? +50 : +35 : +35 : GlobalVars.Bools[6] ? Guildname != string.Empty ? +35 : +20 : +20);
                                }
                                //7
                                //6
                                //5


                                if (Playername.ToUpper().Contains("KITHARA"))  // she changed name to margarite or sm shit so find new 1 Q~Q
                                {
                                    DrawLabel(collider.bounds.center, "The Waifu", new Color(0.705f, 0.490f, 1.0f, 1.0f), +35);
                                }

                                if (aHERO.photonView.owner.name != "")
                                {
                                    DrawLabel(collider.bounds.center + Headpos, aHERO.photonView.owner.name, GlobalVars.Colors[7], +35);
                                }

                                if (GlobalVars.Bools[4] || GlobalVars.Bools[5] || GlobalVars.Bools[6] || GlobalVars.Bools[7])
                                {
                                    string strTags = string.Empty;
                                    if (aHERO.photonView.owner.customProperties.ContainsKey("RCteam"))
                                    {
                                        strTags = strTags + "[RC] ";
                                    }
                                    if (aHERO.photonView.owner.customProperties.ContainsKey("NRC"))
                                    {
                                        strTags = strTags + "[NRC] ";
                                    }
                                    if (aHERO.photonView.owner.customProperties.ContainsKey("Nathan"))
                                    {
                                        strTags = strTags + "[Nathan] ";
                                    }
                                    if (aHERO.photonView.owner.customProperties.ContainsKey("KageNoKishi"))
                                    {
                                        strTags = strTags + "[KnK] ";
                                    }
                                    if (aHERO.photonView.owner.customProperties.ContainsKey("not null"))
                                    {
                                        strTags = strTags + "[ECMod] ";
                                    }

                                    if (strTags != string.Empty)
                                    {
                                        DrawLabel(collider.bounds.center - Headpos, strTags, new Color(0.0f, 0.7f, 1.0f, 1.0f), 0);
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }