Пример #1
0
        public void InitSceneData()
        {
            CombatGameState combat = UnityGameInstance.BattleTechGame.Combat;

            if (!EncounterLayerParentGameObject)
            {
                EncounterLayerParentGameObject = GameObject.Find("EncounterLayerParent");
            }
            EncounterLayerParent = EncounterLayerParentGameObject.GetComponent <EncounterLayerParent>();

            EncounterLayerData = GetActiveEncounter();
            if (EncounterLayerData == null) // If no EncounterLayer matches the Contract Type GUID, it's a custom contract type
            {
                EncounterLayerData   = ConstructCustomContractType();
                IsCustomContractType = true;
            }
            else
            {
                IsCustomContractType = false;
            }

            EncounterLayerGameObject = EncounterLayerData.gameObject;
            EncounterLayerData.CalculateEncounterBoundary();

            if (HexGrid == null)
            {
                HexGrid = ReflectionHelper.GetPrivateStaticField(typeof(WorldPointGameLogic), "_hexGrid") as HexGrid;
            }
        }
Пример #2
0
        public void InitSceneData()
        {
            CombatGameState combat = UnityGameInstance.BattleTechGame.Combat;

            if (!EncounterLayerParentGameObject)
            {
                EncounterLayerParentGameObject = GameObject.Find("EncounterLayerParent");
            }
            EncounterLayerParent = EncounterLayerParentGameObject.GetComponent <EncounterLayerParent>();

            EncounterLayerData       = GetActiveEncounter();
            EncounterLayerGameObject = EncounterLayerData.gameObject;
            EncounterLayerData.CalculateEncounterBoundary();

            if (HexGrid == null)
            {
                HexGrid = ReflectionHelper.GetPrivateStaticField(typeof(WorldPointGameLogic), "_hexGrid") as HexGrid;
            }
        }