コード例 #1
0
    private void ShowTileLayer()
    {
        if (BeforeWCount != WidthCount || BeforeHCount != HeightCount)
        {
            TileLayersData = new bool[WidthCount, HeightCount];

            BeforeWCount = WidthCount;
            BeforeHCount = HeightCount;
        }

        if (WidthCount > 0 && HeightCount > 0)
        {
            for (int hIndex = 0; hIndex < HeightCount; hIndex++)
            {
                EditorGUILayout.BeginHorizontal();

                for (int wIndex = 0; wIndex < WidthCount; wIndex++)
                {
                    TileLayersData[wIndex, hIndex] = CustomEditorForms.CheckBoxForm("", TileLayersData[wIndex, hIndex], 15.0f);
                }

                EditorGUILayout.EndHorizontal();
            }
        }
    }
コード例 #2
0
    void OnGUI()
    {
        PrefabSavePath = CustomEditorForms.InputStringForm("PrefabSavePath", PrefabSavePath, 150.0f, 150.0f);

        TowerName = CustomEditorForms.InputStringForm("TowerName", TowerName, 150.0f, 150.0f);

        Damege      = CustomEditorForms.InputIntegerForm("Damege", Damege, 150.0f, 150.0f);
        RangeValue  = CustomEditorForms.InputFloatForm("RangeValue", RangeValue, 150.0f, 150.0f);
        MissileSize = CustomEditorForms.InputVector3Form("MissileSize", MissileSize, 300.0f);

        ShootDelayTime = CustomEditorForms.InputFloatForm("ShootDelayTime", ShootDelayTime, 150.0f, 150.0f);
        ThrowingTime   = CustomEditorForms.InputFloatForm("ThrowingTime", ThrowingTime, 150.0f, 150.0f);

        TowerModel   = CustomEditorForms.InputGameObjectForm("TowerModel", TowerModel, 150.0f, 150.0f);
        MissileModel = CustomEditorForms.InputGameObjectForm("MissileModel", MissileModel, 150.0f, 150.0f);

        CustomEditorForms.ExcuteButton("CreateTower", 150.0f, ExcuteCreateTower);
    }
コード例 #3
0
    void OnGUI()
    {
        EditorGUILayout.BeginVertical();
        {
            WidthCount  = CustomEditorForms.InputIntegerForm("WidthCount", WidthCount, 100.0f);
            HeightCount = CustomEditorForms.InputIntegerForm("HeightCount", HeightCount, 100.0f);
            TileSize    = CustomEditorForms.InputIntegerForm("TileSize", TileSize, 100.0f);

            isShowTileLayer = CustomEditorForms.CheckBoxForm("ShowTileLayer(Checked : ImpossibleTile)", isShowTileLayer, 400.0f);

            if (isShowTileLayer)
            {
                ShowTileLayer();
            }

            CustomEditorForms.ExcuteButton("Create", 100.0f, ExcuteCreateTiles);
        }
        EditorGUILayout.EndVertical();
    }