Exemplo n.º 1
0
 protected Non_PLayer(NPC_Names npName, NPC_Class npClass, int npHealth, Player_Weapon npWeapon)
 {
     _name   = npName;
     _class  = npClass;
     _health = npHealth;
     _weapon = npWeapon;
 }
        public static Non_PLayer Generate_NPC()
        {
            Non_PLayer npc = null;

            Array     values     = Enum.GetValues(typeof(NPC_Names));
            Random    random     = new Random();
            NPC_Names randomName =
                (NPC_Names)values.GetValue(random.Next(values.Length));

            Array     rValues     = Enum.GetValues(typeof(NPC_Class));
            Random    cRandom     = new Random();
            NPC_Class randomClass =
                (NPC_Class)rValues.GetValue(cRandom.Next(rValues.Length));

            Array         wValues      = Enum.GetValues(typeof(Player_Weapon));
            Random        wRandom      = new Random();
            Player_Weapon randomWeapon =
                (Player_Weapon)wValues.GetValue(wRandom.Next(wValues.Length));

            switch (randomClass)
            {
            case NPC_Class.Egnor:
                npc = new Egnor(randomName, randomWeapon);
                break;

            case NPC_Class.Erstine:
                npc = new Erstine(randomName, randomWeapon);
                break;

            case NPC_Class.Tyrania:
                npc = new Erstine(randomName, randomWeapon);
                break;

            default:
                Text_Buffer.Add("No Player Detected...");
                break;
            }

            return(npc);
        }
 public Erstine(NPC_Names _name, Player_Weapon eWeapon)
     : base(_name, NPC_Class.Erstine, 250, eWeapon)
 {
     this._X_Position = 0;
     this._Y_Position = 1;
 }
 public Tyrania(NPC_Names _name, Player_Weapon tWeapon)
     : base(_name, NPC_Class.Tyrania, 400, tWeapon)
 {
     this._X_Position = 0;
     this._Y_Position = 1;
 }
Exemplo n.º 5
0
 public Egnor(NPC_Names _name, Player_Weapon eWeapon)
     : base(_name, NPC_Class.Egnor, 150, eWeapon)
 {
     this._X_Position = 0;
     this._Y_Position = 1;
 }