public static void Main()
        {
            var    shape = Console.ReadLine();
            var    width = double.Parse(Console.ReadLine());
            double height;

            if (shape == "Square")
            {
                height = width;
            }
            else
            {
                height = double.Parse(Console.ReadLine());
            }

            var figure = new DrawTool(width, height);

            Console.WriteLine(figure.Draw());
        }
Пример #2
0
    // Update is called once per frame
    void Update()
    {
        DrawTool.DrawRectangleSolid(Rectangle_p, Rectangle_p.position, _distance, transform.localScale.x * 2);//攻擊範圍標示

        //進入CD
        CDing();

        //使用技能
        if (CanUseSkill && Input.GetKeyDown(KeyCode.Alpha2))
        {
            UseSkill();
        }

        if (CanUseSkill && isUse && isAnimation)
        {
            CostMP();
            _sword = Instantiate(sword, transform.position, transform.rotation);
            _sword.transform.SetParent(transform);
            StartCD();
            settle();
        }

        //播放動畫
        if (isAnimation)
        {
            ani_time -= Time.deltaTime;
            DrawTool.Draw(Rectangle_p, true);
            if (ani_time <= 0)
            {
                ani_time = fairy_guide.length;
                Destroy(_sword);
                DrawTool.EndDraw(Rectangle_p, true);
                isAnimation = false;
            }
        }
    }