コード例 #1
0
ファイル: APresenter.cs プロジェクト: Maxii/CodeEnv.Master
 public AItemPresenter(IViewable view) {
     View = view;
     _viewGameObject = (view as Component).gameObject;
     Item = AcquireItemReference();
     // the following use ItemData so Views should only be enabled to create this Presenter after ItemData is set
     View.HudPublisher = InitializeHudPublisher();
 }
コード例 #2
0
        public void MakeAPizzaSupreme(AItemModel C, AItemModel S, List <Toppings> T)
        {
            Pizzas.Add(_pizzaFactory.Make <PizzaSupreme>());
            Pizzas.Last().Crust         = (Crust)C;
            Pizzas.Last().Size          = (Size)S;
            Pizzas.Last().PizzaToppings = T;
            var tp = T.Sum(x => x.ItemPrice);

            Pizzas.Last().CalculatePrice(tp);
        }