コード例 #1
0
ファイル: UserPlayer.cs プロジェクト: JinsooLee-Testing/aww
    // Update is called once per frame
    void OnMouseDown()
    {
        if (magic.GetInst().curmagic_id == 5)
        {
            status.Heal(80);
            EffectManager.GetInst().ShowEffect_Summon(this.CurHex.gameObject, 12, 1);
            CostManager.GetInst().CostDecrease(CostManager.GetInst().Curcostnum);
            MapManager.GetInst().ResetMapColor();
            CameraManager.GetInst().ResetCameraTarget();
            magic.GetInst().curmagic_id = 0;
        }
        if (magic.GetInst().curmagic_id == 8)
        {
            if (Equip == false)
            {
                EquipShield();

                EffectManager.GetInst().ShowEffect_Summon(this.CurHex.gameObject, 12, 1);
                CostManager.GetInst().CostDecrease(CostManager.GetInst().Curcostnum);
                MapManager.GetInst().ResetMapColor();
                CameraManager.GetInst().ResetCameraTarget();
                magic.GetInst().curmagic_id = 0;
            }
            else
            {
                MapManager.GetInst().ResetMapColor();
                CameraManager.GetInst().ResetCameraTarget();
            }
        }
        else
        {
            PlayerManager.GetInst().select_object = this;
            PlayerManager.GetInst().SetPickPos(this);
        }
    }
コード例 #2
0
    void OnMouseDown()
    {
        if (InGame == true && PlayerManager.GetInst().Players[PlayerManager.GetInst().CurTurnIdx].act != ACT.STUN)
        {
            if (CostManager.GetInst().cur_cost_num >= cost)
            {
                if (On_active == true)
                {
                    PlayerBase pb = PlayerManager.GetInst().Players[PlayerManager.GetInst().CurTurnIdx];
                    Manager.GetInst().MoveCamPosToTile(pb.CurHex);
                    PlayerManager.GetInst().HilightSummons();

                    act = ACT.SUMMONES;
                    CostManager.GetInst().CostDecrease(cost);
                    On_active = false;
                }
            }
        }
        else
        {
            if (PlayerManager.GetInst().Players[PlayerManager.GetInst().CurTurnIdx].act != ACT.STUN)
            {
                CardLoadManager.GetInst().OnCard(summon_id);
            }
        }
    }
コード例 #3
0
        public static bool BuildMinions(int ob_id, int user_id, int amount)
        {
            using (var db = new MinionWarsEntities())
            {
                OffensiveBuilding ob = db.OffensiveBuilding.Find(ob_id);

                List <MinionOwnership> mol = db.MinionOwnership.Where(x => x.owner_id == user_id && x.minion_id == ob.minion_id).ToList();
                if (mol.Count > 0)
                {
                    bool check = CostManager.ApplyMinionCosts(user_id, amount);
                    if (check)
                    {
                        MinionOwnership mo = mol.First();
                        mo.group_count += amount;
                        mo.available   += amount;
                    }
                    else
                    {
                        return(false);
                    }
                }
            }

            return(true);
        }
コード例 #4
0
        static void Main(string[] args)
        {
            IInventory      inventory      = new InventoryManager();
            IOrderVerify    orderVerify    = new OrderVerificationManager();
            ICosting        costManger     = new CostManager();
            IPaymentGateway paymentGateWay = new PaymentGatewayManager();
            ILogistics      logistics      = new LogisticsManager();


            // Creating the Order/Product details
            OrderDetails orderDetails = new OrderDetails("C# Design Pattern Book",
                                                         "Simplified book on design patterns in C#",
                                                         500,
                                                         10,
                                                         "Street No 1",
                                                         "Educational Area",
                                                         1212,
                                                         "4156213754"
                                                         );

            // Client Code without Facade.

            // Updating the inventory.

            inventory.Update(orderDetails.ProductNo);

            // Verfying various details for the order such as the shipping address.

            orderVerify.VerifyShippingAddress(orderDetails.PinCode);



            // Calculating the final cost after applying various discounts.

            orderDetails.Price = costManger.ApplyDiscounts(orderDetails.Price,
                                                           orderDetails.DiscountPercent
                                                           );

            // Going through various steps if payment gateway like card verification, charging from the card.

            paymentGateWay.VerifyCardDetails(orderDetails.CardNo);
            paymentGateWay.ProcessPayment(orderDetails.CardNo, orderDetails.Price);

            // Completing the order by providing Logistics.

            logistics.ShipProduct(orderDetails.ProductName, string.Format("{0}, {1} - {2}.",
                                                                          orderDetails.AddressLine1, orderDetails.AddressLine2,
                                                                          orderDetails.PinCode));

            //Facade

            OrderOnlineFacade facade = new OrderOnlineFacade(inventory, costManger,
                                                             logistics, orderVerify, paymentGateWay);

            facade.FinalizeOrder(orderDetails);



            Console.ReadLine();
        }
コード例 #5
0
    void FinishUpdate()
    {
        m_state = EState.End;

        // 勝者の芸術ポイント保存
        for (int i = 0; i < m_playerObj.Count; ++i)
        {
            if (m_playerObj[i] == null)
            {
                continue;
            }
            if (m_playerObj[i].GetMyState() == PlayerController.EState.Dead)
            {
                continue;
            }
            m_playerObj[i].Win();
            m_winnerPlayer = m_playerObj[i];
            // 芸術点採点
            ArtGrading         art         = m_playerObj[i].gameObject.GetComponent <ArtGrading>();
            BattlePointGrading battlePoint = m_playerObj[i].gameObject.GetComponent <BattlePointGrading>();
            art.ArtistGrading();
            // コストマネージャーに登録
            CostManager costManager = FindObjectOfType <CostManager>();
            costManager.SaveArtCostData(m_playerObj[i].PlayerID, art.Cost);
            costManager.SaveRankPointData(m_playerObj[i].PlayerID, 0);
            m_artArmatureSave.InContainer(m_playerObj[i].gameObject, art.Cost.allCost);
            Debug.Log("勝者:" + m_playerObj[i].name + " 芸術ポイント:" + art.Cost.allCost);

            // 勝者を殺すプログラム
            //m_playerObj[i].Dead();
        }

        m_gameSceneController.ChangeScene();
    }
コード例 #6
0
ファイル: CostManager.cs プロジェクト: aqcd/ChessTD
 void Awake()
 {
     if (instance == null)
     {
         instance = this;
     }
 }
コード例 #7
0
 /// <summary>
 /// Construct the object.
 /// </summary>
 public SimpleDecisionProblem(KnowledgeBase kb, CostManager cm, SensorModule sm, int MaxIterations)
     : base(MaxIterations)
 {
     this.kb           = kb;
     this.costManager  = cm;
     this.sensorModule = sm;
 }
コード例 #8
0
 void IDecisionManager.CleanUp()
 {
     knowledgeBase = null;
     opt           = null;
     prob.CleanUp();
     sensorModule = null;
     costManager.CleanUp();
     costManager = null;
 }
コード例 #9
0
ファイル: MagicCard.cs プロジェクト: JinsooLee-Testing/aww
    void OnMouseDown()
    {
        if (InGame == true && PlayerManager.GetInst().Players[PlayerManager.GetInst().CurTurnIdx].act != ACT.STUN)
        {
            if (CostManager.GetInst().cur_cost_num >= cost)
            {
                if (On_active == true)
                {
                    if (magic_id == 2 || magic_id == 6)
                    {
                        magic.GetInst().type = "water";
                    }
                    else if (magic_id == 3)
                    {
                        magic.GetInst().type = "wall";
                        Debug.Log("fire");
                    }
                    else if (magic_id == 4)
                    {
                        magic.GetInst().type = "wind";
                    }
                    else if (magic_id == 1 || magic_id == 7)
                    {
                        magic.GetInst().type = "fire";
                    }
                    else
                    {
                        magic.GetInst().type = "buff";
                    }

                    magic.GetInst().curmagic_id = magic_id;
                    PlayerBase pb = PlayerManager.GetInst().Players[PlayerManager.GetInst().CurTurnIdx];
                    Manager.GetInst().MoveCamPosToTile(pb.CurHex);
                    PlayerManager.GetInst().Players[PlayerManager.GetInst().CurTurnIdx].act = ACT.MAGIC;
                    CostManager.GetInst().Curcostnum = cost;
                    Debug.Log(CostManager.GetInst().Curcostnum);
                    if (magic_id == 3)
                    {
                        MapManager.GetInst().HilightAttackRange(pb.CurHex, 2);
                    }
                    else
                    {
                        MapManager.GetInst().HilightAttackRange(pb.CurHex, 4);
                    }
                    On_click = true;
                }
            }
        }
        else
        {
            Debug.Log("Dww");
            if (PlayerManager.GetInst().Players[PlayerManager.GetInst().CurTurnIdx].act != ACT.STUN)
            {
                CardLoadManager.GetInst().OnCard(magic_id);
            }
        }
    }
コード例 #10
0
 public SwarmOpsDecisionManager(KnowledgeBase knowledgeBase, SensorModule sensorModule)
 {
     this.knowledgeBase = knowledgeBase;
     this.sensorModule  = sensorModule;
     this.costManager   = new CostManager(knowledgeBase, sensorModule);
     this.prob          = new SimpleDecisionProblem(knowledgeBase, costManager, sensorModule, MAX_OPTIMIZATION_ITERATIONS);
     this.opt           = new DE(this.prob);
     Globals.Random     = new RandomOps.MersenneTwister();
 }
コード例 #11
0
    // Use this for initialization
    void Start()
    {
        for (int i = 0; i < MaxPlayer; ++i)
        {
            m_attackPointData.Add(0);
        }
        m_costManager = FindObjectOfType <CostManager>();

        m_playerController = gameObject.GetComponent <PlayerController>();
    }
コード例 #12
0
 private void Start()
 {
     CManager = FindObjectOfType <CostManager>();
     Init();
     SceneChangeFlg  = false;
     ResultFinishFlg = false;
     flame           = 0;
     AudioManager.GetInstance.PlayBGM(AUDIO.BGM_RESULT, AudioManager.BGM_FADE_SPEED_RATE_HIGH);
     VictoryCharSet();
 }
コード例 #13
0
    private void Start()
    {
        CManager = FindObjectOfType <CostManager>();
        //       Init();
        flame = 0;
        now_s = 0;

        //       PointColorSet();
        //       RankSet();
        //       PointSet();
    }
コード例 #14
0
//	private GameObject[] boardObjects;

//	private GameObject NailDropAreaLeft;
//	private GameObject NailDropAreaRight;
//	private GameObject NailDropAreaMiddle;

    void Start()
    {
        boardClonedGameObject = new GameObject[boardNum];
        nailClonedGameObject  = new GameObject[nailNum];
        boxClonedGameObject   = new GameObject[boxNum];
//		image = itemBeingDragged.GetComponent<Image>();
//		originImageWidth = image.rectTransform.rect.width;
//		originImageHeight = image.rectTransform.rect.height;
        //print (originImage.rectTransform.rect.height);
//		originImageSprite = image.sprite;
//		startPosition = itemBeingDragged.transform.position;
        dragNailNum = 0;
//		nailPosition = itemBeingDragged.transform.position;

        costManager = GameObject.Find("Cost Manager").GetComponent <CostManager> ();
        //***********
        //need to revise for if there are several boards
        //Debug.Log(itemBeingDragged.name);
        //Debug.Log(itemBeingDragged.GetComponentInChildren<Transform>());

//		boardObjects= GameObject.FindGameObjectsWithTag("Board");

//		NailDropAreaLeft = GameObject.Find ("NailDropArea-left");
//		NailDropAreaRight = GameObject.Find ("NailDropArea-right");
//		NailDropAreaMiddle = GameObject.Find ("NailDropArea-middle");
        //Debug.Log (GameObject.Find ("NailDropArea-left"));


        if (itemBeingDragged.tag == "Board")
        {
            countTool.text = "x " + boardNum;
            var children = itemBeingDragged.GetComponentsInChildren <Image>();
            foreach (Image child in children)
            {
                //Debug.Log(child.name);
                if (child.name == "RotateButton-right" || child.name == "RotateButton-left")
                {
                    //Debug.Log ("hah");
                    child.enabled = false;
                }
            }
        }
        else if (itemBeingDragged.tag == "Nail")
        {
            countTool.text = "x " + nailNum;
        }
        else if (itemBeingDragged.tag == "Box")
        {
            countTool.text = "x " + boxNum;
        }


        canBeDrag = true;
    }
コード例 #15
0
    // Use this for initialization
    void Start()
    {
        if (DebugModeGame.GetProperty().m_debugPlayerEnable)
        {
            m_state = EState.Main;
        }
        m_gameSceneController = gameObject.GetComponent <GameSceneController>();
        m_costManager         = FindObjectOfType <CostManager>();

        SetPlayerBothCollider(false); // プレイヤー同士の当たり判定無効化
    }
コード例 #16
0
ファイル: CostManagerTests.cs プロジェクト: sychova/Parking
 public void GetPriceThrowsArgumentNullException()
 {
     try
     {
         CostManager costManager = new CostManager();
         Money       result      = costManager.GetPrice(null);
     }
     catch (ArgumentNullException ex)
     {
         Assert.True(ex is ArgumentNullException);
     }
 }
コード例 #17
0
ファイル: CostManagerTests.cs プロジェクト: sychova/Parking
        public void GetPriceReturnsValidCost()
        {
            Car car = new Car();

            car.Arrival   = new DateTime(2018, 06, 08, 10, 00, 00);
            car.Departure = new DateTime(2018, 06, 08, 22, 00, 00);

            CostManager costManager = new CostManager();
            Money       result      = costManager.GetPrice(car);

            Assert.NotNull(result);
            Assert.Equal(120, result.Value);
        }
コード例 #18
0
    // Start is called before the first frame update
    void Start()
    {
        Debug.Log("gun !!");
        costManager = GetComponent <CostManager>();

        if (costManager != null)
        {
            costManager.OnEquip += isCost => {
                container.Bullet = (isCost) ? null : bullet;
                container.Gun    = (isCost) ? null : gun;
            }
        }
        ;

        cellBullet.OnChanged += item => {
            if (item == null)
            {
                this.bullet = null;
                return;
            }
            if (item.status is StatusBullet bullet)
            {
                this.bullet = bullet;
            }
            else
            {
                this.bullet = null;
            }
        };

        cellGun.OnChanged += item => {
            if (item == null)
            {
                this.gun = null;
                return;
            }
            if (item.status is StatusGun gun)
            {
                this.gun = gun;
            }
            else
            {
                this.gun = null;
            }
        };
    }
}
コード例 #19
0
        private static void OnlineShoppingSystem()
        {
            Console.WriteLine("");
            Console.WriteLine("================ Online Shopping Without Facade Object ===============");
            Console.WriteLine("");

            // Creating the Order/Product details
            OrderDetails orderDetails = new OrderDetails(
                "C# Design Pattern Book",                               //Product Name
                "Simplified book on design patterns in C#",             //Description
                500,                                                    //Price
                10,                                                     //Discount in %
                "SF-1, Chitrakut Complex",                              //Address Line 1
                "Nr. Pasha Bhai Park, Gotri, Vadodara, Gujarat, India", //Address Line 2
                390007,                                                 // Pincode
                "4156213754"                                            //Card details
                );


            // Updating the inventory.
            IInventory inventory = new InventoryManager();

            inventory.Update(orderDetails.ProductNo);

            // Verfying various details for the order such as the shipping address.
            IOrderVerify orderVerify = new OrderVerificationManager();

            orderVerify.VerifyShippingAddress(orderDetails.PinCode);

            // Calculating the final cost after applying various discounts.
            ICosting costManger = new CostManager();

            orderDetails.Price = costManger.ApplyDiscounts(orderDetails.Price, orderDetails.DiscountPercent);

            // Going through various steps if payment gateway like card verification, charging from the card.
            IPaymentGateway paymentGateWay = new PaymentGatewayManager();

            paymentGateWay.VerifyCardDetails(orderDetails.CardNo);
            paymentGateWay.ProcessPayment(orderDetails.CardNo, orderDetails.Price);

            // Completing the order by providing Logistics.
            ILogistics logistics = new LogisticsManager();

            logistics.ShipProduct(orderDetails.ProductName, $"{orderDetails.AddressLine1}, {orderDetails.AddressLine2} - {orderDetails.PinCode}.");
        }
コード例 #20
0
ファイル: TradeManager.cs プロジェクト: svukelic/MinionWars
        public static bool BuyMinions(int trade_id, int user_id)
        {
            using (var db = new MinionWarsEntities())
            {
                Trading trade = db.Trading.Find(trade_id);
                bool    check = CostManager.ApplyMinionCosts(user_id, trade.amount);
                if (check)
                {
                    RewardGenerator.AwardMinions(user_id, trade.minion_id, trade.amount);

                    db.Trading.Remove(trade);

                    db.SaveChanges();
                }
            }

            return(true);
        }
コード例 #21
0
 /// <summary>
 /// 弾のダメージをセットし、敵のHPを減らす関数
 /// </summary>
 /// <param name="bDamage"></param>
 public void SetBulletDamage(int bDamage)
 {
     bulletDamage = bDamage;
     hp          -= bulletDamage;
     Debug.Log($"現在のHPは{hp}");
     m_enemyHPSlider.value = hp;
     //敵のHPが0以下になったら
     if (hp <= 0)
     {
         //敵が倒されたときにエフェクトを発生させる
         DeathEffectGenerate();
         //Costを増やす
         CostManager c = m_costMana.GetComponent <CostManager>();
         c.UpCost();
         //敵を破壊する
         Destroy(this.gameObject);
     }
 }
コード例 #22
0
    public void TurnOver()
    {
        MapManager.GetInst().ResetMapColor();
        PlayerBase pb = Players[CurTurnIdx];

        pb.CurHex.Passable = false;

        if (pb.act != ACT.CASTING)
        {
            pb.act = ACT.IDLE;
        }


        if (Players.Count > 0)
        {
            CurTurnIdx++;
        }
        if (CurTurnIdx >= Players.Count)
        {
            CurTurnIdx = 0;
        }

        PlayerBase pb2 = Players[CurTurnIdx];

        if (pb2.m_type == Type.MAINCHARACTER)
        {
            CostManager.GetInst().AddCost();
        }
        if (pb2.act == ACT.CASTING)
        {
            pb2.casting = true;
        }
        select_object = pb2;

        CameraManager.GetInst().ResetCameraTarget();
    }
コード例 #23
0
        #pragma warning disable 1998
        public async override global::System.Threading.Tasks.Task ExecuteAsync()
        {
#line 3 "/Users/maryiapaliashchuk/Downloads/ZEUS/Educo.Parking.Shell.Web/Views/Home/Index.cshtml"

            ViewData["Title"] = "User Profile";
            CostManager costManager = new CostManager();

#line default
#line hidden
            BeginContext(185, 58, true);
            WriteLiteral("\n<div class=\"row\">\n    <h4 class=\"teal-text center-align\">");
            EndContext();
            BeginContext(244, 15, false);
#line 10 "/Users/maryiapaliashchuk/Downloads/ZEUS/Educo.Parking.Shell.Web/Views/Home/Index.cshtml"
            Write(Model.FirstName);

#line default
#line hidden
            EndContext();
            BeginContext(259, 57, true);
            WriteLiteral("\'s Profile</h4>\n    <div class=\"col l6 m12 s12\">\n        ");
            EndContext();
            BeginContext(316, 1774, false);
            __tagHelperExecutionContext = __tagHelperScopeManager.Begin("form", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagAndEndTag, "c0e1f34739cc436a94b740b138af0b8d", async() => {
                BeginContext(399, 235, true);
                WriteLiteral("\n            <div class=\"card #ffffff white\">\n                <div class=\"card-content\">\n                    <span class=\"card-title indigo-text\">Order a Car</span>\n                    <div class=\"input-field\">\n                        ");
                EndContext();
                BeginContext(634, 66, false);
                __tagHelperExecutionContext = __tagHelperScopeManager.Begin("select", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagAndEndTag, "dc81cb89a9c0417c8ddb9474ba698087", async() => {
                }
                                                                            );
                __Microsoft_AspNetCore_Mvc_TagHelpers_SelectTagHelper = CreateTagHelper <global::Microsoft.AspNetCore.Mvc.TagHelpers.SelectTagHelper>();
                __tagHelperExecutionContext.Add(__Microsoft_AspNetCore_Mvc_TagHelpers_SelectTagHelper);
#line 17 "/Users/maryiapaliashchuk/Downloads/ZEUS/Educo.Parking.Shell.Web/Views/Home/Index.cshtml"
                __Microsoft_AspNetCore_Mvc_TagHelpers_SelectTagHelper.For = ModelExpressionProvider.CreateModelExpression(ViewData, __model => __model.SelectedCar);

#line default
#line hidden
                __tagHelperExecutionContext.AddTagHelperAttribute("asp-for", __Microsoft_AspNetCore_Mvc_TagHelpers_SelectTagHelper.For, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
#line 17 "/Users/maryiapaliashchuk/Downloads/ZEUS/Educo.Parking.Shell.Web/Views/Home/Index.cshtml"
                __Microsoft_AspNetCore_Mvc_TagHelpers_SelectTagHelper.Items = Model.CarItems;

#line default
#line hidden
                __tagHelperExecutionContext.AddTagHelperAttribute("asp-items", __Microsoft_AspNetCore_Mvc_TagHelpers_SelectTagHelper.Items, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
                await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
                if (!__tagHelperExecutionContext.Output.IsContentModified)
                {
                    await __tagHelperExecutionContext.SetOutputContentAsync();
                }
                Write(__tagHelperExecutionContext.Output);
                __tagHelperExecutionContext = __tagHelperScopeManager.End();
                EndContext();
                BeginContext(700, 233, true);
                WriteLiteral("\n                    </div>\n                    <span class=\"card-title indigo-text\">Parkings:</span>\n                    <div class=\"row\">\n                        <div class=\"input-field col l6 m12 s12\">\n                            ");
                EndContext();
                BeginContext(933, 103, false);
                __tagHelperExecutionContext = __tagHelperScopeManager.Begin("select", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagAndEndTag, "540315730c314fce9e03fd55465f817d", async() => {
                }
                                                                            );
                __Microsoft_AspNetCore_Mvc_TagHelpers_SelectTagHelper = CreateTagHelper <global::Microsoft.AspNetCore.Mvc.TagHelpers.SelectTagHelper>();
                __tagHelperExecutionContext.Add(__Microsoft_AspNetCore_Mvc_TagHelpers_SelectTagHelper);
                __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_0);
#line 22 "/Users/maryiapaliashchuk/Downloads/ZEUS/Educo.Parking.Shell.Web/Views/Home/Index.cshtml"
                __Microsoft_AspNetCore_Mvc_TagHelpers_SelectTagHelper.For = ModelExpressionProvider.CreateModelExpression(ViewData, __model => __model.SelectedParking);

#line default
#line hidden
                __tagHelperExecutionContext.AddTagHelperAttribute("asp-for", __Microsoft_AspNetCore_Mvc_TagHelpers_SelectTagHelper.For, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
#line 22 "/Users/maryiapaliashchuk/Downloads/ZEUS/Educo.Parking.Shell.Web/Views/Home/Index.cshtml"
                __Microsoft_AspNetCore_Mvc_TagHelpers_SelectTagHelper.Items = Model.ParkingItems;

#line default
#line hidden
                __tagHelperExecutionContext.AddTagHelperAttribute("asp-items", __Microsoft_AspNetCore_Mvc_TagHelpers_SelectTagHelper.Items, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
                await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
                if (!__tagHelperExecutionContext.Output.IsContentModified)
                {
                    await __tagHelperExecutionContext.SetOutputContentAsync();
                }
                Write(__tagHelperExecutionContext.Output);
                __tagHelperExecutionContext = __tagHelperScopeManager.End();
                EndContext();
                BeginContext(1036, 490, true);
                WriteLiteral(@"
                        </div>
                        <div class=""col l6 m12 s12"">
                            <a style=""margin-top:2rem;"" class=""waves-effect waves-light btn-small"" onclick=""findLocation()"">Find Nearest</a>
                        </div>
                    </div>
                    <div id=""map"" style=""height:15rem;""></div>
                    <p style=""margin-top:3vh; text-align:right;""><button type=""submit"" class=""btn waves-effect waves-light"">Order</button></p>
");
                EndContext();
#line 30 "/Users/maryiapaliashchuk/Downloads/ZEUS/Educo.Parking.Shell.Web/Views/Home/Index.cshtml"
                if (TempData["SuccessMessage"] != null)
                {
#line default
#line hidden
                    BeginContext(1609, 401, true);
                    WriteLiteral(@"                        <button style=""display:none;"" id=""orderTrigger"" data-target=""OrderModal"" class=""btn modal-trigger"">Trigger</button>
                        <script type=""text/javascript"">

                            window.onload = function () {
                                document.getElementById(""orderTrigger"").click();
                            }

                        </script>
");
                    EndContext();
#line 40 "/Users/maryiapaliashchuk/Downloads/ZEUS/Educo.Parking.Shell.Web/Views/Home/Index.cshtml"
                }

#line default
#line hidden
                BeginContext(2033, 50, true);
                WriteLiteral("                </div>\n            </div>\n        ");
                EndContext();
            }
                                                                        );
            __Microsoft_AspNetCore_Mvc_TagHelpers_FormTagHelper = CreateTagHelper <global::Microsoft.AspNetCore.Mvc.TagHelpers.FormTagHelper>();
            __tagHelperExecutionContext.Add(__Microsoft_AspNetCore_Mvc_TagHelpers_FormTagHelper);
            __Microsoft_AspNetCore_Mvc_TagHelpers_RenderAtEndOfFormTagHelper = CreateTagHelper <global::Microsoft.AspNetCore.Mvc.TagHelpers.RenderAtEndOfFormTagHelper>();
            __tagHelperExecutionContext.Add(__Microsoft_AspNetCore_Mvc_TagHelpers_RenderAtEndOfFormTagHelper);
            __Microsoft_AspNetCore_Mvc_TagHelpers_FormTagHelper.Controller = (string)__tagHelperAttribute_1.Value;
            __tagHelperExecutionContext.AddTagHelperAttribute(__tagHelperAttribute_1);
            __Microsoft_AspNetCore_Mvc_TagHelpers_FormTagHelper.Action = (string)__tagHelperAttribute_2.Value;
            __tagHelperExecutionContext.AddTagHelperAttribute(__tagHelperAttribute_2);
            __Microsoft_AspNetCore_Mvc_TagHelpers_FormTagHelper.Method = (string)__tagHelperAttribute_3.Value;
            __tagHelperExecutionContext.AddTagHelperAttribute(__tagHelperAttribute_3);
            __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_4);
            await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);

            if (!__tagHelperExecutionContext.Output.IsContentModified)
            {
                await __tagHelperExecutionContext.SetOutputContentAsync();
            }
            Write(__tagHelperExecutionContext.Output);
            __tagHelperExecutionContext = __tagHelperScopeManager.End();
            EndContext();
            BeginContext(2090, 1858, true);
            WriteLiteral(@"
    </div>
    <div class=""col l6 m12 s12"">
        <div class=""card"">
            <div class=""card-content"">
                <span class=""card-title indigo-text"">Statistics</span>
            </div>
            <div class=""card-tabs"">
                <ul class=""tabs tabs-fixed-width"">
                    <li class=""tab""><a href=""#tab1"">Week</a></li>
                    <li class=""tab""><a class=""active"" href=""#tab2"">Month</a></li>
                    <li class=""tab""><a href=""#tab3"">Year</a></li>
                </ul>
            </div>
            <div class=""card-content grey lighten-4"">
                <div id=""tab1"">
                    <p>Average amount: 1</p>
                    <p>Number of parking: 1</p>
                    <p>Average duration: 1</p>
                    <p>SOME CHART</p>
                </div>
                <div id=""tab2"">
                    <p>Average amount: 2</p>
                    <p>Number of parking: 2</p>
                    <p>Average duration: 2</p>
                    <p");
            WriteLiteral(@">SOME CHART</p>
                </div>
                <div id=""tab3"">
                    <p>Average amount: 3</p>
                    <p>Number of parking: 3</p>
                    <p>Average duration: 3</p>
                    <p>SOME CHART</p>
                </div>
            </div>
        </div>
    </div>


</div>
<div class=""row"">
    <div class=""col l6 m12 s12"">
        <div class=""card #ffffff white"">
            <div class=""card-content"">
                <span class=""card-title indigo-text"">In Progress</span>
                <table>
                    <thead>
                        <tr>
                            <th>Car</th>
                            <th>Amount to pay</th>
                            <th>Parking</th>
                        </tr>
                    </thead>
                    <tbody>
");
            EndContext();
#line 97 "/Users/maryiapaliashchuk/Downloads/ZEUS/Educo.Parking.Shell.Web/Views/Home/Index.cshtml"
            foreach (Car car in Model.Cars)
            {
                Money money = costManager.GetPrice(car);

#line default
#line hidden
                BeginContext(4100, 69, true);
                WriteLiteral("                            <tr>\n                                <td>");
                EndContext();
                BeginContext(4170, 15, false);
#line 101 "/Users/maryiapaliashchuk/Downloads/ZEUS/Educo.Parking.Shell.Web/Views/Home/Index.cshtml"
                Write(car.StateNumber);

#line default
#line hidden
                EndContext();
                BeginContext(4185, 51, true);
                WriteLiteral("</td>\n                                <td class=\"\">");
                EndContext();
                BeginContext(4237, 11, false);
#line 102 "/Users/maryiapaliashchuk/Downloads/ZEUS/Educo.Parking.Shell.Web/Views/Home/Index.cshtml"
                Write(money.Value);

#line default
#line hidden
                EndContext();
                BeginContext(4248, 1, true);
                WriteLiteral(" ");
                EndContext();
                BeginContext(4250, 14, false);
#line 102 "/Users/maryiapaliashchuk/Downloads/ZEUS/Educo.Parking.Shell.Web/Views/Home/Index.cshtml"
                Write(money.Currency);

#line default
#line hidden
                EndContext();
                BeginContext(4264, 42, true);
                WriteLiteral("</td>\n                                <td>");
                EndContext();
                BeginContext(4307, 58, false);
#line 103 "/Users/maryiapaliashchuk/Downloads/ZEUS/Educo.Parking.Shell.Web/Views/Home/Index.cshtml"
                Write(Model.Parkings.SingleOrDefault(p => p.Key == car.Id).Value);

#line default
#line hidden
                EndContext();
                BeginContext(4365, 40, true);
                WriteLiteral("</td>\n                            </tr>\n");
                EndContext();
#line 105 "/Users/maryiapaliashchuk/Downloads/ZEUS/Educo.Parking.Shell.Web/Views/Home/Index.cshtml"
            }

#line default
#line hidden
            BeginContext(4431, 1147, true);
            WriteLiteral(@"                    </tbody>
                </table>
            </div>
        </div>
    </div>
    <div class=""col l6 m12 s12"">
        <div class=""card #ffffff white"">
            <div class=""card-content"">
                <span class=""card-title indigo-text"">News</span>
                <p>
                    <!--  Экспорт новостей TUT.BY  -->
                    <script type=""text/javascript"" src=""https://news.tut.by/export/TUTBYExporter.js"" charset=""utf-8""></script>
                    <script type=""text/javascript"" src=""https://news.tut.by/export/auto/autonews_3.js"" charset=""utf-8""></script>
                    <script type=""text/javascript"">
                        TUTBY.SetTitleStyle(""Verdana, Arial,Helvetica, sans-serif"", 12, ""black"");
                        TUTBY.SetTargetBlank();
                        TUTBY.ExportNews();
                    </script>
                    <!--  Экспорт новостей TUT.BY   -->

                </p>
            </div>
        </div>
    </div>   
        <div id=""O");
            WriteLiteral("rderModal\" class=\"modal\">\n            <div class=\"modal-content\">\n                <h4>Order Status</h4>\n                <p>");
            EndContext();
            BeginContext(5579, 26, false);
#line 133 "/Users/maryiapaliashchuk/Downloads/ZEUS/Educo.Parking.Shell.Web/Views/Home/Index.cshtml"
            Write(TempData["SuccessMessage"]);

#line default
#line hidden
            EndContext();
            BeginContext(5605, 275, true);
            WriteLiteral(@"</p>
            </div>
            <div class=""modal-footer"">
                <a href=""#!"" class="" modal-action modal-close waves-effect waves-green btn-flat"" onclick=""ReadyToGo()"">OK</a>
            </div>
        </div>
    </div>
<input type=""hidden"" id=""ok"" data-value='");
            EndContext();
            BeginContext(5881, 14, false);
#line 140 "/Users/maryiapaliashchuk/Downloads/ZEUS/Educo.Parking.Shell.Web/Views/Home/Index.cshtml"
            Write(TempData["OK"]);

#line default
#line hidden
            EndContext();
            BeginContext(5895, 5, true);
            WriteLiteral("\' />\n");
            EndContext();
            DefineSection("scripts", async() => {
                BeginContext(5930, 147, true);
                WriteLiteral("\n        <script src=\"https://maps.googleapis.com/maps/api/js?key=AIzaSyBLwtv_Ybh-Qqou7wwrMs2PkLufJ2civN0&callback=showMap\" async defer></script>\n\n");
                EndContext();
            }
                          );
        }
コード例 #24
0
 private CostManager(CostManager original)
 {
     _cachedValue = original._cachedValue;
     _toBeUpdated = original._toBeUpdated;
     _costEffects.AddRange(original._costEffects);
 }
コード例 #25
0
ファイル: fireball.cs プロジェクト: JinsooLee-Testing/aww
    // Update is called once per frame
    void Update()
    {
        ef_time += Time.deltaTime;
        // if (PlayerManager.GetInst().Players[PlayerManager.GetInst().CurTurnIdx].act ==ACT.MAGIC)
        //{

        MapManager.GetInst().ResetMapColor();

        float distance = Vector3.Distance(transform.position, target);

        magic.GetInst().fired = true;
        CameraManager.GetInst().ResetCameraTarget();
        if (distance > 1f) //이동중
        {
            transform.position += (target - transform.position).normalized * 7 * Time.smoothDeltaTime;

            if (ef_time > 0.2)
            {
                EffectManager.GetInst().ShowEffect(this.transform, effect);
                ef_time = 0f;
            }

            target.y = 1;
            if (effect == 1)
            {
                transform.rotation = Quaternion.LookRotation((target - transform.position).normalized);
                Vector3 r = transform.rotation.eulerAngles;
                r.x -= 90;
                transform.rotation = Quaternion.Euler(r);
            }
            else
            {
                if (magic.GetInst().curmagic_id != 6)
                {
                    transform.rotation = Quaternion.LookRotation((target - transform.position).normalized);
                    Vector3 r = transform.rotation.eulerAngles;
                    r.y -= 90;
                    transform.rotation = Quaternion.Euler(r);
                }
            }
        }
        else //다음 목표 hex에 도착함
        {
            transform.position = target;
            magic.GetInst().fired = false;

            MapManager.GetInst().MarkAttackRange(magic.GetInst().targetAI.CurHex, 2, false);
            PlayerManager pm = PlayerManager.GetInst();


            if (effect == 1)
            {
                if (magic.GetInst().act != ACT.HIT)
                {
                    EffectManager.GetInst().ShowEffect_Fire(targetHex.gameObject, this.gameObject);
                    if (magic.GetInst().curmagic_id == 1)
                    {
                        magic.GetInst().targetAI.GetDamage(damage);
                    }
                    else
                    {
                        magic.GetInst().targetAI.GetDamage(100);
                    }
                    CostManager.GetInst().CostDecrease(CostManager.GetInst().Curcostnum);
                }
                else
                {
                    Destroy(this.gameObject);
                }

                magic.GetInst().act = ACT.HIT;
            }
            else
            {
                for (int i = 0; i < pm.Players.Count; ++i)
                {
                    if (pm.Players[i].CurHex.At_Marked == true)
                    {
                        if (pm.Players[i].m_type == Type.MONSTER)
                        {
                            pm.Players[i].GetDamage(damage);
                            EffectManager.GetInst().ShowEffect_water(pm.Players[i].gameObject, this.gameObject, 4);
                        }
                    }
                }
                Destroy(this.gameObject);
                magic.GetInst().targetAI.GetDamage(damage);
                if (magic.GetInst().act != ACT.HIT)
                {
                    EffectManager.GetInst().ShowEffect_water(targetHex.gameObject, this.gameObject, 4);
                    CostManager.GetInst().CostDecrease(CostManager.GetInst().Curcostnum);
                }
                if (magic.GetInst().act != ACT.HIT)
                {
                    magic.GetInst().act = ACT.HIT;
                }
            }
            //PlayerManager.GetInst().Players[PlayerManager.GetInst().CurTurnIdx].act = ACT.IDLE;
            MapManager.GetInst().ResetMapColor();
        }
        // fire = false;
        //   }
    }
コード例 #26
0
ファイル: ui.cs プロジェクト: JinsooLee-Testing/aww
    void OnMouseDown()
    {
        if (act == "move")
        {
            PlayerBase pb = pm.Players[pm.CurTurnIdx];
            Debug.Log(pb.m_type);
            if (pb.m_type == Type.USER || pb.m_type == Type.MAINCHARACTER && pb.act != ACT.STUN)
            {
                if (CostManager.GetInst().cur_cost_num >= 1)
                {
                    //MapManager.GetInst().ResetMapColor();

                    if (pb.act != ACT.MOVING)
                    {
                        Manager.GetInst().MoveCamPosToTile(pb.CurHex);
                        PlayerManager.GetInst().select_object = pb;
                        pb.CurHex.Passable = true;
                        SoundManager.GetInst().PlayClickSound();
                        if (pb.m_type != Type.MONSTER)
                        {
                            if (MapManager.GetInst().HilightMoveRange(pb.CurHex, pb.status.MoveRange))
                            {
                                pm.Players[pm.CurTurnIdx].act = ACT.MOVEHILIGHT;
                            }
                        }
                    }
                }
            }
        }
        if (act == "attack")
        {
            MapManager.GetInst().ResetMapColor();

            SoundManager.GetInst().PlayClickSound();
            Debug.Log("Attack");
            PlayerBase pb = pm.Players[pm.CurTurnIdx];
            if (pb.m_type == Type.USER || pb.m_type == Type.MAINCHARACTER && pb.act != ACT.STUN)
            {
                if (pb.act != ACT.MOVING)
                {
                    Manager.GetInst().MoveCamPosToTile(pb.CurHex);

                    pb.CurHex.Passable = true;
                    if (pb.m_type != Type.MONSTER)
                    {
                        if (MapManager.GetInst().HilightAttackRange(pb.CurHex, pb.status.attackRange))
                        {
                            pm.Players[pm.CurTurnIdx].act = ACT.ATTACKHIGHLIGHT;
                        }
                    }
                }
            }
        }
        if (act == "turnover")
        {
            PlayerBase pb = pm.Players[pm.CurTurnIdx];
            if (pb.act != ACT.MOVING)
            {
                SoundManager.GetInst().PlayClickSound();
                PlayerManager.GetInst().TurnOver();
            }
        }
        if (act == "exit")
        {
            SoundManager.GetInst().PlayClickSound();
            Debug.Log("Attack");
            MapManager.GetInst().num = 0;
            SceneManager.LoadScene(1);
        }
    }
コード例 #27
0
 public void CleanUp()
 {
     costManager  = null;
     sensorModule = null;
     kb           = null;
 }
コード例 #28
0
    public void MoveToNearUserPlayer(PlayerBase aiplayer)
    {
        PlayerManager pm             = PlayerManager.GetInst();
        MapManager    mm             = MapManager.GetInst();
        PlayerBase    nearUserPlayer = null;
        int           nearDistance   = 50;
        //근접 플레이어 서치
        int i = Random.Range(1, 5);

        foreach (PlayerBase up in pm.Players)
        {
            if (up is UserPlayer)
            {
                int distance = mm.GetDistance(up.CurHex, aiplayer.CurHex);
                if (nearDistance > distance)
                {
                    nearUserPlayer = up;
                    nearDistance   = distance;
                }
            }
        }

        if (aiplayer.m_type == Type.MONSTER || CostManager.GetInst().enemy_cost_num < 3)
        {
            if (nearUserPlayer != null)
            {
                List <Hex> path = mm.GetPath(aiplayer.CurHex, nearUserPlayer.CurHex);

                if (path == null)
                {
                    PlayerManager.GetInst().TurnOver();
                }
                else
                {
                    if (path.Count > aiplayer.status.MoveRange)
                    {
                        path.RemoveRange(aiplayer.status.MoveRange, path.Count - aiplayer.status.MoveRange);
                    }
                    aiplayer.MoveHexes = path;
                    if (nearUserPlayer.CurHex.MapPos == aiplayer.MoveHexes[aiplayer.MoveHexes.Count - 1].MapPos)
                    {
                        aiplayer.MoveHexes.RemoveAt(aiplayer.MoveHexes.Count - 1);
                    }
                    if (aiplayer.MoveHexes.Count == 0)
                    {
                        AtkAItoUser(aiplayer);
                        return;
                    }
                    aiplayer.act = ACT.MOVING;
                }
                MapManager.GetInst().ResetMapColor(aiplayer.CurHex.MapPos);
            }
        }
        else if (CostManager.GetInst().enemy_cost_num >= 3 && CostManager.GetInst().enemy_cost_num < 5 && aiplayer.m_type == Type.BOSS)
        {
            List <Hex> path = mm.GetPath(aiplayer.CurHex, nearUserPlayer.CurHex);

            if (path == null)
            {
                PlayerManager.GetInst().TurnOver();
            }
            Point v    = aiplayer.CurHex.MapPos;
            int   su_x = 0;
            int   su_y = 0;
            for (int j = 0; j < MapManager.GetInst().MapSizeX; ++j)
            {
                for (int k = 0; k < MapManager.GetInst().MapSizeZ; ++k)
                {
                    int x = Random.Range(-3, 3);
                    int z = Random.Range(-3, 3);

                    x = v.GetX() + x;
                    z = v.GetZ() + z;

                    if ((int)x > MapManager.GetInst().MapSizeX)
                    {
                        x = MapManager.GetInst().MapSizeX - 1;
                    }
                    if ((int)z > MapManager.GetInst().MapSizeZ)
                    {
                        z = MapManager.GetInst().MapSizeZ - 1;
                    }
                    if ((int)x <= 0)
                    {
                        x = 1;
                    }
                    if ((int)z <= 0)
                    {
                        z = 1;
                    }

                    if (MapManager.GetInst().Map[x][0][z].Passable == true)
                    {
                        su_x = x;
                        su_y = z;
                        break;
                    }
                }
            }
            PlayerManager.GetInst().GenAIPlayer(su_x, su_y);
            EffectManager.GetInst().ShowEffect_Summon(aiplayer.CurHex.gameObject, 6, 0f);
            CostManager.GetInst().enemy_cost_num -= 3;
            //PlayerManager.GetInst().TurnOver();
        }
        else if (CostManager.GetInst().enemy_cost_num < 8 && aiplayer.m_type == Type.BOSS)
        {
            aiplayer.act = ACT.CASTING;
            EffectManager.GetInst().ShowEffect_Summon(aiplayer.CurHex.gameObject, 9, 0.0f);
            CostManager.GetInst().enemy_cost_num -= 5;
            PlayerManager.GetInst().TurnOver();
        }
        else
        {
            if (aiplayer.m_type == Type.BOSS)
            {
                List <Hex> path = mm.GetPath(aiplayer.CurHex, nearUserPlayer.CurHex);

                if (path == null)
                {
                    PlayerManager.GetInst().TurnOver();
                }
                Vector3 v = aiplayer.transform.position;


                if (path.Count < 5)
                {
                    if (CostManager.GetInst().enemy_cost_num > 5)
                    {
                        aiplayer.act = ACT.CASTING;
                        EffectManager.GetInst().ShowEffect_Summon(aiplayer.CurHex.gameObject, 9, 0.0f);
                        CostManager.GetInst().enemy_cost_num -= 5;
                        PlayerManager.GetInst().TurnOver();
                    }
                }
                else
                {
                    if (nearUserPlayer != null)
                    {
                        if (path == null)
                        {
                            PlayerManager.GetInst().TurnOver();
                        }
                        else
                        {
                            if (path.Count > aiplayer.status.MoveRange)
                            {
                                path.RemoveRange(aiplayer.status.MoveRange, path.Count - aiplayer.status.MoveRange);
                            }
                            aiplayer.MoveHexes = path;
                            if (nearUserPlayer.CurHex.MapPos == aiplayer.MoveHexes[aiplayer.MoveHexes.Count - 1].MapPos)
                            {
                                aiplayer.MoveHexes.RemoveAt(aiplayer.MoveHexes.Count - 1);
                            }

                            if (aiplayer.MoveHexes.Count == 0)
                            {
                                AtkAItoUser(aiplayer);

                                return;
                            }
                            aiplayer.act = ACT.MOVING;
                        }
                        MapManager.GetInst().ResetMapColor(aiplayer.CurHex.MapPos);
                    }
                }

                Point p    = aiplayer.CurHex.MapPos;
                int   su_x = 0;
                int   su_y = 0;
                for (i = 0; i < 2; ++i)
                {
                    for (int j = 0; j < MapManager.GetInst().MapSizeX; ++j)
                    {
                        for (int k = 0; k < MapManager.GetInst().MapSizeZ; ++k)
                        {
                            int x = Random.Range(-3, 3);
                            int z = Random.Range(-3, 3);

                            x = p.GetX() + x;
                            z = p.GetZ() + z;

                            if ((int)x > MapManager.GetInst().MapSizeX)
                            {
                                x = MapManager.GetInst().MapSizeX - 1;
                            }
                            if ((int)z > MapManager.GetInst().MapSizeZ)
                            {
                                z = MapManager.GetInst().MapSizeZ - 1;
                            }
                            if ((int)x <= 0)
                            {
                                x = 1;
                            }
                            if ((int)z <= 0)
                            {
                                z = 1;
                            }

                            if (MapManager.GetInst().Map[x][0][z].Passable == true)
                            {
                                su_x = x;
                                su_y = z;
                                break;
                            }
                        }
                    }
                    PlayerManager.GetInst().GenAIPlayer(su_x, su_y);
                    EffectManager.GetInst().ShowEffect_Summon(aiplayer.CurHex.gameObject, 6, 0f);
                    CostManager.GetInst().enemy_cost_num -= 3;
                }
            }
        }
    }
コード例 #29
0
        public ActionResult GetBuildingCosts(int building_id)
        {
            List <CostObject> col = CostManager.GetBuildingCosts(building_id);

            return(Json(col));
        }
コード例 #30
0
 private void Start()
 {
     costManager = FindObjectOfType <CostManager>();
 }