예제 #1
0
        public void Add(Vector2 hardPoint, HardPointType type)
        {
            string      dataAsset   = type == HardPointType.Engine ? "Sprites\\UI\\InGameUI\\EngineHardPointUI" : "Sprites\\UI\\InGameUI\\HardPointUI";
            HardPointUI hardPointUI = new HardPointUI(Parent, hardPoint, dataAsset);

            if (type == HardPointType.Engine)
            {
                EngineHardPointUI.Add(hardPointUI);
            }
            else
            {
                OtherHardPointUI.Add(hardPointUI);
            }
        }
예제 #2
0
        public void Initialize(ShipData shipData)
        {
            foreach (Vector2 otherHardPoint in shipData.OtherHardPoints)
            {
                HardPointUI hardPointUI = new HardPointUI(Parent, otherHardPoint);
                hardPointUI.LoadContent();
                hardPointUI.Initialize();
                OtherHardPointUI.Add(hardPointUI);
            }

            foreach (Vector2 engineHardPoint in shipData.EngineHardPoints)
            {
                HardPointUI hardPointUI = new HardPointUI(Parent, engineHardPoint, "Sprites\\UI\\InGameUI\\EngineHardPointUI");
                hardPointUI.LoadContent();
                hardPointUI.Initialize();
                EngineHardPointUI.Add(hardPointUI);
            }
        }