Пример #1
0
    void Start()
    {
        //Overriding NPCAI default Variable Values
        //NPCHeight = 2;
        NPCHeight = gameObject.GetComponent <CapsuleCollider>().height;
        inRot     = 180;
        //xOffSet = 2;
        //zOffSet = 0;

        ctfObj     = GameObject.Find("Capture the Flag");
        ctfScript  = ctfObj.GetComponent <CaptureTheFlag>();
        DamageArea = GameObject.Find("DamageArea");
        if (team)
        {
            //healthTextRotation.eulerAngles = new Vector3(0, transform.eulerAngles.y + inRot, 0);
            healthTextRotation.eulerAngles = new Vector3(0, inRotAdd(transform.eulerAngles.y, inRot), 0);
        }
        else
        {
            //zOffSet = 2;
            //healthTextRotation.eulerAngles = new Vector3(0, transform.eulerAngles.y + 180 + inRot, 0);
            healthTextRotation.eulerAngles = new Vector3(0, inRotAdd(transform.eulerAngles.y, inRot));
        }
        healthtext = Instantiate(healthTxtPrefab, new Vector3(transform.position.x, transform.position.y + NPCHeight + 0.5f, transform.position.z), healthTextRotation);
        healthtext.transform.SetParent(gameObject.transform);
        //tmesh = healthtext.GetComponent<TextMesh>();
        textmeshPro = healthtext.GetComponent <TextMeshPro>();
        if (autoHeal)
        {
            InvokeRepeating("healthRegen", 0, 1);          //Calls HealthRegen every second
        }
        charType = getCharType();
    }
Пример #2
0
        public void ToWorkshop(WorkshopBuilder builder, List <LobbySetting> allSettings)
        {
            builder.AppendKeywordLine("modes");
            builder.AppendLine("{");
            builder.Indent();

            if (All != null)
            {
                builder.AppendKeywordLine("General");
                builder.AppendLine("{");
                builder.Indent();
                All.ToWorkshop(builder, allSettings);
                builder.Unindent();
                builder.AppendLine("}");
            }

            Assault?.ToWorkshop(builder, allSettings, "Assault");
            CaptureTheFlag?.ToWorkshop(builder, allSettings, "CaptureTheFlag");
            Control?.ToWorkshop(builder, allSettings, "Control");
            Deathmatch?.ToWorkshop(builder, allSettings, "Deathmatch");
            Elimination?.ToWorkshop(builder, allSettings, "Elimination");
            Escort?.ToWorkshop(builder, allSettings, "Escort");
            Hybrid?.ToWorkshop(builder, allSettings, "Hybrid");
            PracticeRange?.ToWorkshop(builder, allSettings, "PracticeRange");
            Skirmish?.ToWorkshop(builder, allSettings, "Skirmish");
            TeamDeathmatch?.ToWorkshop(builder, allSettings, "TeamDeathmatch");

            builder.Unindent();
            builder.AppendLine("}");
        }
Пример #3
0
 private static bool ConquordConsole_CloseEvent(CtrlType sig)
 {
     if (MessageBox.Show("Do You Want To Close Console ...?", "Message", MessageBoxButtons.OKCancel, MessageBoxIcon.Question) == DialogResult.OK)
     {
         Save();
         foreach (Client.GameClient client in Kernel.GamePool.Values)
         {
             client.Disconnect();
         }
         GameServer.Disable();
         AuthServer.Disable();
         if (GuildWar.IsWar)
         {
             GuildWar.End();
         }
         if (EliteGuildWar.IsWar)
         {
             EliteGuildWar.End();
         }
         if (ClanWar.IsWar)
         {
             ClanWar.End();
         }
         if (CaptureTheFlag.IsWar)
         {
             CaptureTheFlag.Close();
         }
         Application.Exit();
         Environment.Exit(0);
         return(false);
     }
     else
     {
         return(true);
     }
 }