Example #1
0
    public static void DrawTitans()
    {
        IEnumerator zEnum = GameObject.Find("MultiplayerManager").GetComponent <FengGameManagerMKII>().getTitans().GetEnumerator();

        while (zEnum.MoveNext())
        {
            TITAN aTitan = zEnum.Current as TITAN;

            if (!aTitan.hasDie)
            {
                foreach (Collider collider in aTitan.GetComponentsInChildren <Collider>())
                {
                    if (collider.name == "AABB")
                    {
//                         if (HERO.MyPlayer.SimpleVisible(aTitan, HERO.MyPlayer)) // f**k the vischecks for now. They work but i dont want to add 2 colors =_=
//                         {
                        if (GlobalVars.Bools[0])
                        {
                            CustomCanvas.DrawBounds(collider.bounds.center, collider.bounds.extents, GlobalVars.Colors[0]);
                        }

                        // Why the f**k didnt i just f*****g set the color in an else instead of literally duping my f*****g code what the f**k was i thinking..... Ahh f**k it for now
                        if ((int)aTitan.photonView.owner.customProperties[PhotonPlayerProperty.isTitan] == 2)    // 1 is human - 2 is titan
                        {
                            if (GlobalVars.Bools[1])
                            {
                                DrawLabel(aTitan.transform.position, RemoveTags((string)aTitan.photonView.owner.customProperties[PhotonPlayerProperty.name]), GlobalVars.Colors[1], 0);
                            }

                            if (GlobalVars.Bools[2])
                            {
                                DrawLabel(aTitan.transform.position, aTitan.photonView.ownerId.ToString(), GlobalVars.Colors[1], 15);
                            }
                        }
                        else
                        {
                            if (GlobalVars.Bools[1])
                            {
                                DrawLabel(aTitan.transform.position, aTitan.name, GlobalVars.Colors[1], 0);
                            }
                        }
//                        }
//                         else
//                         {
//                             if (GlobalVars.Bools[0])
//                                 CustomCanvas.DrawBounds(collider.bounds.center, collider.bounds.extents, new Color(0.207f, 0.556f, 1.0f, 1.0f));
//
//                             if(aTitan.nonAI)
//                             {
//                                 if (GlobalVars.Bools[1])
//                                     DrawLabel(aTitan.transform.position, (string)aTitan.photonView.owner.customProperties[PhotonPlayerProperty.name], new Color(0.207f, 0.556f, 1.0f, 1.0f), 0);
//                             }
//                             else
//                             {
//                                 if (GlobalVars.Bools[1])
//                                     DrawLabel(aTitan.transform.position, (string)aTitan.name, new Color(0.207f, 0.556f, 1.0f, 1.0f), 0);
//                             }

//                        }
                    }
                }
            }
        }
    }