Beispiel #1
0
        static spellcaster set_up_playaz(out spellcaster playa)
        {
            string input = "";
            bool   castz;

            ++ctr;
            if (ctr == 1)
            {
                castz = true;
            }
            else
            {
                castz = false;
            }

setup:
            Console.Write("\nPlayer " + ctr.ToString() + " (mage / druid): ");
            input = Console.ReadLine().Trim();

            if (input == "mage")
            {
                playa = new mage("Dick", 0, 10, 200, 300, 150, castz, ctr);
            }
            else if (input == "druid")
            {
                playa = new druid("Butt Nr. " + ctr, 0, 10, 250, 200, 100, castz, ctr);
            }
            else
            {
                Console.WriteLine("Please enter either (mage / druid) !");
                goto setup;
            }

            return(playa);
        }
        //get detail of orders
        public JsonResult get_detail()
        {
            var mage = new mage();

            var result = mage.get_open_orders();


            return(Json(JsonRequestBehavior.AllowGet));
        }
        //update status of orders
        public JsonResult cancel_order(string orderId, string status)
        {
            mage mage = new mage();

            var result = mage.cancel_order(orderId, status);


            return(Json(JsonRequestBehavior.AllowGet));
        }
    static void Main()
    {
        knight k = new knight("Charles", 32, "iron");

        k.Attack();
        mage m = new mage("Merlin", 102, "staff");

        m.Attack();

        Console.ReadKey();
    }
Beispiel #5
0
        static void Main(string[] args)
        {
            hunter Vexaliah = new hunter();
            mage   Caleb    = new mage();

            Vexaliah.name   = "Vex'aliah";
            Vexaliah.race   = "Half Elf";
            Vexaliah.bow    = "Blazing Bowstring/+1 Longbow";
            Vexaliah.quiver = "standard Quiver";

            Caleb.name      = "Caleb WidowGhast";
            Caleb.race      = "Human";
            Caleb.wand      = "None";
            Caleb.spellBook = "Transmutation";

            Console.WriteLine(Vexaliah);
            Console.WriteLine(Caleb);
        }
    public void selectCharacter(string name)
    {
        if (isSelect == true)
            return;

        mainmenuBtn.SetActive(false);
        isSelect = true;

        if (name == "Inferno")
            mymage = mage.Inferno;
        else if (name == "Pristine")
            mymage = mage.Pristine;
        else if (name == "Radiance")
            mymage = mage.Radiance;
        else
            mymage = mage.no_one;
        Debug.Log("ispractice: " + launchScene.isPractice.ToString());
        if (launchScene.isPractice == true)
        {
            Debug.Log("here prac");
            selectedCharacter = (int)mymage;
            mylaunchScene.gotoScene("game");

        }
        else
        {

            Debug.Log("here");

            //if (name == "Inferno")
            //    mymage = mage.Inferno;
            //else if (name == "Pristine")
            //    mymage = mage.Pristine;
            //else if (name == "Radiance")
            //    mymage = mage.Radiance;
            //else
            //    mymage = mage.no_one;

            characterInfo();
            runAnimation(false);
            StartCoroutine(changingPos(false));
        }
    }
Beispiel #7
0
        public JsonResult write_RetailDymo(int asset_tag, double price, string manu, string cpu, string ram, string hdd, string sku)
        {
            var existing = (from im in db.retail
                            where im.asset_tag.Equals(asset_tag)
                            select im).SingleOrDefault();

            if (existing != null)
            {
                existing.sold = "NO";

                existing.price = price;
                db.SaveChanges();
            }
            else
            {
                var create_dymo = new retail();
                create_dymo.time         = DateTime.Today;
                create_dymo.custom_label = "NO";
                create_dymo.sold         = "NO";
                create_dymo.asset_tag    = asset_tag;
                create_dymo.model        = manu;
                create_dymo.cpu          = cpu;
                create_dymo.ram          = ram;
                create_dymo.hdd          = hdd;
                create_dymo.price        = price;
                db.retail.Add(create_dymo);
                db.SaveChanges();
                db.Dispose();
            }

            //update price to magento system after price label have printed out
            string price_str = price.ToString();
            mage   mage      = new mage();
            bool   success   = mage.update_price(sku, price_str);



            return(Json(new { success = success }, JsonRequestBehavior.AllowGet));
        }
    // Use this for initialization
    void Start()
    {
        mytest = GameObject.Find("networkController").GetComponent<networktest>();
        mycustomNetworkManager = GameObject.Find("networkController").GetComponent<customNetworkManager>();
        mymage = mage.no_one;
        isSelect = false;
        isMoving = false;

        startingPos = new Vector3[3];
        for(int i=0;i<startingPos.Length;i++)
        {
            startingPos[i] = allCharacter[i].transform.position;
        }
    }
    IEnumerator changingPos(bool isReverse)
    {
        while(true)
        {
            if(isReverse == false)
            {
                allCharacter[(int)mymage].transform.position =
                 Vector3.MoveTowards(allCharacter[(int)mymage].transform.position, target.position, 6);

                if (Vector3.Distance(allCharacter[(int)mymage].transform.position, target.position) <= 1.0f)
                {
                    allCharacter[(int)mymage].transform.position = target.position;
                    //isMoving = false;
                    charInfo.SetActive(true);
                    break;
                }
            }
            else
            {
                allCharacter[(int)mymage].transform.position =
                Vector3.MoveTowards(allCharacter[(int)mymage].transform.position, startingPos[(int)mymage], 6);

                if (Vector3.Distance(allCharacter[(int)mymage].transform.position, startingPos[(int)mymage]) <= 1.0f)
                {
                    allCharacter[(int)mymage].transform.position = startingPos[(int)mymage];

                    isSelect = false;
                    mymage = mage.no_one;
                    mainmenuBtn.SetActive(true);
                    break;
                }
            }

            yield return new WaitForEndOfFrame();
        }
    }
    void changePosition(bool isReverse)
    {
        if (isSelect == false)//haven select
            return;

        if (isReverse == false)
        {
            allCharacter[(int)mymage].transform.position =
            Vector3.MoveTowards(allCharacter[(int)mymage].transform.position, target.position, 6);

            if (Vector3.Distance(allCharacter[(int)mymage].transform.position, target.position) <= 1.0f)
            {
                allCharacter[(int)mymage].transform.position = target.position;
                isMoving = false;
                charInfo.SetActive(true);
            }
        }
        else
        {
            allCharacter[(int)mymage].transform.position =
            Vector3.MoveTowards(allCharacter[(int)mymage].transform.position, startingPos[(int)mymage], 6);

            if (Vector3.Distance(allCharacter[(int)mymage].transform.position, startingPos[(int)mymage]) <= 1.0f)
            {
                allCharacter[(int)mymage].transform.position = startingPos[(int)mymage];

                isSelect = false;
                mymage = mage.no_one;
            }

        }
    }