Initial commit: Unity WordConnect project
This commit is contained in:
@ -0,0 +1,62 @@
|
||||
// // ©2015 - 2025 Candy Smith
|
||||
// // All rights reserved
|
||||
// // Redistribution of this software is strictly not allowed.
|
||||
// // Copy of this software can be obtained from unity asset store only.
|
||||
// // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// // FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
// // THE SOFTWARE.
|
||||
|
||||
using System;
|
||||
using UnityEngine;
|
||||
using WordsToolkit.Scripts.Popups;
|
||||
using WordsToolkit.Scripts.Services.Ads.AdUnits;
|
||||
|
||||
namespace WordsToolkit.Scripts.Settings
|
||||
{
|
||||
public class AdsSettings : ScriptableObject
|
||||
{
|
||||
public AdSetting[] adProfiles;
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class AdSetting
|
||||
{
|
||||
public string name;
|
||||
public bool enable = true;
|
||||
public bool testInEditor;
|
||||
public EPlatforms platforms;
|
||||
public string appId;
|
||||
public AdsHandlerBase adsHandler;
|
||||
public AdElement[] adElements;
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class AdElement
|
||||
{
|
||||
public string placementId;
|
||||
public AdReference adReference;
|
||||
|
||||
[Header("Popup that triggers Interstitial ads")]
|
||||
public PopupEventAdsSetting popup;
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class PopupEventAdsSetting
|
||||
{
|
||||
public Popup popup;
|
||||
public bool showOnOpen;
|
||||
public bool showOnClose;
|
||||
}
|
||||
|
||||
public enum EPlatforms
|
||||
{
|
||||
Android,
|
||||
IOS,
|
||||
Windows,
|
||||
WebGL
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 417adac05521446ba62d9ce36bf3b4c1
|
||||
timeCreated: 1709473124
|
||||
@ -0,0 +1,39 @@
|
||||
// // ©2015 - 2025 Candy Smith
|
||||
// // All rights reserved
|
||||
// // Redistribution of this software is strictly not allowed.
|
||||
// // Copy of this software can be obtained from unity asset store only.
|
||||
// // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// // FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
// // THE SOFTWARE.
|
||||
|
||||
using UnityEngine;
|
||||
using UnityEngine.Playables;
|
||||
|
||||
namespace WordsToolkit.Scripts.Settings
|
||||
{
|
||||
public class ClearDirectorBindingsAfterStop : MonoBehaviour
|
||||
{
|
||||
private PlayableDirector timelineDirector;
|
||||
private bool timelineFinished;
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
timelineDirector = GetComponent<PlayableDirector>();
|
||||
}
|
||||
|
||||
private void Update()
|
||||
{
|
||||
if (!timelineFinished && timelineDirector.time >= timelineDirector.duration)
|
||||
{
|
||||
timelineFinished = true;
|
||||
// clear all bindings
|
||||
timelineDirector.playableAsset = null;
|
||||
timelineDirector.Stop();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 2524d71e15664af397ce8f596b86f6d7
|
||||
timeCreated: 1726329370
|
||||
@ -0,0 +1,23 @@
|
||||
// // ©2015 - 2025 Candy Smith
|
||||
// // All rights reserved
|
||||
// // Redistribution of this software is strictly not allowed.
|
||||
// // Copy of this software can be obtained from unity asset store only.
|
||||
// // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// // FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
// // THE SOFTWARE.
|
||||
|
||||
using UnityEngine;
|
||||
using WordsToolkit.Scripts.Services.IAP;
|
||||
using WordsToolkit.Scripts.Utils;
|
||||
|
||||
namespace WordsToolkit.Scripts.Settings
|
||||
{
|
||||
public class CoinsShopSettings : ScriptableObject
|
||||
{
|
||||
public SerializableDictionary<ProductID, int> coinsProducts = new();
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: cc9dc87feff54cc984e76548c50cde5f
|
||||
timeCreated: 1725686919
|
||||
16
Assets/WordConnectGameToolkit/Scripts/Settings/ColorsTile.cs
Normal file
16
Assets/WordConnectGameToolkit/Scripts/Settings/ColorsTile.cs
Normal file
@ -0,0 +1,16 @@
|
||||
using UnityEngine;
|
||||
using WordsToolkit.Scripts.Gameplay;
|
||||
|
||||
namespace WordsToolkit.Scripts.Settings
|
||||
{
|
||||
[CreateAssetMenu(fileName = "ColorsTile", menuName ="WordConnectGameToolkit/Editor/ColorsTile", order = 1)]
|
||||
public class ColorsTile : ScriptableData
|
||||
{
|
||||
public Color faceColor = Color.white;
|
||||
public Color topColor = Color.white;
|
||||
public Color bottomColor = Color.white;
|
||||
// public GameObject customItemPrefab;
|
||||
|
||||
public bool HasCustomPrefab() => false;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 06baa31be0964520b74ceef8579044a3
|
||||
timeCreated: 1741708800
|
||||
@ -0,0 +1,34 @@
|
||||
// // ©2015 - 2025 Candy Smith
|
||||
// // All rights reserved
|
||||
// // Redistribution of this software is strictly not allowed.
|
||||
// // Copy of this software can be obtained from unity asset store only.
|
||||
// // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// // FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
// // THE SOFTWARE.
|
||||
|
||||
using System;
|
||||
using UnityEngine;
|
||||
using WordsToolkit.Scripts.Data;
|
||||
|
||||
namespace WordsToolkit.Scripts.Settings
|
||||
{
|
||||
public class DailyBonusSettings : SettingsBase
|
||||
{
|
||||
public bool dailyBonusEnabled = true;
|
||||
public RewardSetting[] rewards = Array.Empty<RewardSetting>();
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class RewardSetting
|
||||
{
|
||||
public Sprite icon;
|
||||
public Sprite iconGreyed;
|
||||
public ResourceObject resource;
|
||||
public int count;
|
||||
public bool isLight;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1e352da8d83b46c0a0b370c01f1c3666
|
||||
timeCreated: 1692291006
|
||||
@ -0,0 +1,42 @@
|
||||
// // ©2015 - 2025 Candy Smith
|
||||
// // All rights reserved
|
||||
// // Redistribution of this software is strictly not allowed.
|
||||
// // Copy of this software can be obtained from unity asset store only.
|
||||
// // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// // FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
// // THE SOFTWARE.
|
||||
|
||||
using UnityEngine;
|
||||
using UnityEngine.InputSystem;
|
||||
|
||||
namespace WordsToolkit.Scripts.Settings
|
||||
{
|
||||
public class DebugSettings : SettingsBase
|
||||
{
|
||||
[Header("Debug hotkeys")]
|
||||
public bool enableHotkeys = true;
|
||||
|
||||
[Tooltip("press to win")]
|
||||
public Key Win = Key.W;
|
||||
|
||||
[Tooltip("press to lose")]
|
||||
public Key Lose = Key.L;
|
||||
|
||||
[Tooltip("android's back button")]
|
||||
public Key Back = Key.Escape;
|
||||
|
||||
[Tooltip("press to restart level")]
|
||||
public Key Restart = Key.R;
|
||||
|
||||
[Tooltip("press to simulate duplicate word")]
|
||||
public Key SimulateDuplicate = Key.D;
|
||||
|
||||
[Header("")]
|
||||
[Tooltip("Test language, only for editor")]
|
||||
public SystemLanguage TestLanguage = SystemLanguage.English;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 728a77825752492cb66f01c6aa069280
|
||||
timeCreated: 1725684592
|
||||
@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: bace04c860e6491092211f34d9d461a7
|
||||
timeCreated: 1725704333
|
||||
@ -0,0 +1,74 @@
|
||||
// // ©2015 - 2025 Candy Smith
|
||||
// // All rights reserved
|
||||
// // Redistribution of this software is strictly not allowed.
|
||||
// // Copy of this software can be obtained from unity asset store only.
|
||||
// // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// // FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
// // THE SOFTWARE.
|
||||
|
||||
#if UNITY_EDITOR
|
||||
using UnityEditor;
|
||||
using UnityEditor.UIElements;
|
||||
using UnityEngine.UIElements;
|
||||
using WordsToolkit.Scripts.Services.Ads.AdUnits;
|
||||
|
||||
namespace WordsToolkit.Scripts.Settings.Editor
|
||||
{
|
||||
[CustomPropertyDrawer(typeof(AdElement))]
|
||||
public class AdElementDrawer : PropertyDrawer
|
||||
{
|
||||
public override VisualElement CreatePropertyGUI(SerializedProperty property)
|
||||
{
|
||||
// Create a new VisualElement
|
||||
var root = new VisualElement();
|
||||
|
||||
// Add placementId field
|
||||
var placementIdField = new PropertyField(property.FindPropertyRelative("placementId"));
|
||||
root.Add(placementIdField);
|
||||
|
||||
// Add adTypeScriptable field
|
||||
var adTypeScriptableProperty = property.FindPropertyRelative("adReference");
|
||||
var adTypeScriptableField = new PropertyField(adTypeScriptableProperty);
|
||||
root.Add(adTypeScriptableField);
|
||||
|
||||
// Add popup field
|
||||
var popupField = new PropertyField(property.FindPropertyRelative("popup"));
|
||||
root.Add(popupField);
|
||||
|
||||
adTypeScriptableField.RegisterValueChangeCallback(evt =>
|
||||
{
|
||||
// Retrieve the selected adType from the AdTypeScriptable
|
||||
var adTypeScriptableObject = (AdReference)adTypeScriptableProperty.objectReferenceValue;
|
||||
if (adTypeScriptableObject != null && adTypeScriptableObject.adType == EAdType.Interstitial)
|
||||
{
|
||||
popupField.visible = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (root.Contains(popupField))
|
||||
{
|
||||
popupField.visible = false;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
// Add popup field only if adType is not Rewarded
|
||||
if (adTypeScriptableProperty != null)
|
||||
{
|
||||
var adTypeScriptableObject = (AdReference)adTypeScriptableProperty.objectReferenceValue;
|
||||
if (adTypeScriptableObject != null && adTypeScriptableObject.adType == EAdType.Rewarded)
|
||||
{
|
||||
root.Remove(popupField);
|
||||
}
|
||||
}
|
||||
|
||||
// Return the root VisualElement
|
||||
return root;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 68d4eb51aed94d4a9b4209a928083b4f
|
||||
timeCreated: 1709623047
|
||||
@ -0,0 +1,65 @@
|
||||
#if UNITY_EDITOR
|
||||
using UnityEditor;
|
||||
using UnityEditor.UIElements;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UIElements;
|
||||
|
||||
namespace WordsToolkit.Scripts.Settings.Editor
|
||||
{
|
||||
[CustomPropertyDrawer(typeof(AdSetting))]
|
||||
public class AdSettingDrawer : PropertyDrawer
|
||||
{
|
||||
public override VisualElement CreatePropertyGUI(SerializedProperty property)
|
||||
{
|
||||
// Create a new VisualElement
|
||||
var root = new VisualElement();
|
||||
|
||||
// Create a foldout
|
||||
var foldout = new Foldout { text = property.displayName, value = false };
|
||||
root.Add(foldout);
|
||||
|
||||
// Add fields to the foldout
|
||||
var nameField = new PropertyField(property.FindPropertyRelative("name"), "Name");
|
||||
var enableField = new PropertyField(property.FindPropertyRelative("enable"), "Enable");
|
||||
var testInEditorField = new PropertyField(property.FindPropertyRelative("testInEditor"), "Test In Editor");
|
||||
var platformsField = new PropertyField(property.FindPropertyRelative("platforms"), "Platforms");
|
||||
var appIdField = new PropertyField(property.FindPropertyRelative("appId"), "App ID");
|
||||
var adsHandlerField = new PropertyField(property.FindPropertyRelative("adsHandler"), "Ads Handler");
|
||||
var adElementsField = new PropertyField(property.FindPropertyRelative("adElements"), "Ad Elements");
|
||||
|
||||
foldout.Add(nameField);
|
||||
foldout.Add(enableField);
|
||||
foldout.Add(testInEditorField);
|
||||
foldout.Add(platformsField);
|
||||
foldout.Add(appIdField);
|
||||
foldout.Add(adsHandlerField);
|
||||
foldout.Add(adElementsField);
|
||||
|
||||
// Callback to update the state of the fields and foldout style
|
||||
void UpdateFieldsState(bool isEnabled)
|
||||
{
|
||||
nameField.SetEnabled(isEnabled);
|
||||
testInEditorField.SetEnabled(isEnabled);
|
||||
platformsField.SetEnabled(isEnabled);
|
||||
appIdField.SetEnabled(isEnabled);
|
||||
adsHandlerField.SetEnabled(isEnabled);
|
||||
adElementsField.SetEnabled(isEnabled);
|
||||
|
||||
foldout.style.color = isEnabled ? Color.white : Color.grey;
|
||||
}
|
||||
|
||||
// Initial state update
|
||||
UpdateFieldsState(property.FindPropertyRelative("enable").boolValue);
|
||||
|
||||
// Register callback to update fields and foldout style when 'enable' changes
|
||||
enableField.RegisterValueChangeCallback(evt =>
|
||||
{
|
||||
UpdateFieldsState(evt.changedProperty.boolValue);
|
||||
});
|
||||
|
||||
// Return the root VisualElement
|
||||
return root;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1e8f074cdfc548fb8b0722de46a5f56b
|
||||
timeCreated: 1737623180
|
||||
@ -0,0 +1,19 @@
|
||||
{
|
||||
"name": "CandySmith.Settings.Editor",
|
||||
"rootNamespace": "",
|
||||
"references": [
|
||||
"GUID:d3bf71b33c0c04eb9bc1a8d6513d76bb",
|
||||
"GUID:00dd4a7ac8c24c898083910c81898ecc"
|
||||
],
|
||||
"includePlatforms": [
|
||||
"Editor"
|
||||
],
|
||||
"excludePlatforms": [],
|
||||
"allowUnsafeCode": false,
|
||||
"overrideReferences": false,
|
||||
"precompiledReferences": [],
|
||||
"autoReferenced": true,
|
||||
"defineConstraints": [],
|
||||
"versionDefines": [],
|
||||
"noEngineReferences": false
|
||||
}
|
||||
@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 2e755fc9023fa4372a757a229ad32c45
|
||||
AssemblyDefinitionImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@ -0,0 +1,86 @@
|
||||
using UnityEngine;
|
||||
using UnityEngine.UIElements;
|
||||
using UnityEditor;
|
||||
using UnityEditor.UIElements;
|
||||
|
||||
namespace WordsToolkit.Scripts.Settings.Editor
|
||||
{
|
||||
[CustomPropertyDrawer(typeof(TutorialShowCondition))]
|
||||
public class TutorialShowConditionDrawer : PropertyDrawer
|
||||
{
|
||||
private static StyleSheet styleSheet;
|
||||
|
||||
private void LoadStyleSheet()
|
||||
{
|
||||
if (styleSheet == null)
|
||||
{
|
||||
styleSheet = AssetDatabase.LoadAssetAtPath<StyleSheet>(
|
||||
"Assets/WordConnectGameToolkit/Scripts/Settings/Editor/TutorialShowConditionDrawer.uss");
|
||||
|
||||
if (styleSheet == null)
|
||||
{
|
||||
Debug.LogWarning("Could not load TutorialShowConditionDrawer.uss");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public override VisualElement CreatePropertyGUI(SerializedProperty property)
|
||||
{
|
||||
LoadStyleSheet();
|
||||
var root = new VisualElement();
|
||||
if (styleSheet != null)
|
||||
{
|
||||
root.styleSheets.Add(styleSheet);
|
||||
}
|
||||
|
||||
var fieldsContainer = new VisualElement();
|
||||
fieldsContainer.AddToClassList("tutorial-fields-container");
|
||||
|
||||
// Add label
|
||||
var propertyLabel = new Label("Tutorial Condition");
|
||||
propertyLabel.AddToClassList("property-label");
|
||||
fieldsContainer.Add(propertyLabel);
|
||||
|
||||
// Create fields container
|
||||
var fieldsGroup = new VisualElement();
|
||||
fieldsGroup.AddToClassList("fields-container");
|
||||
|
||||
var conditionProperty = property.FindPropertyRelative("showCondition");
|
||||
var conditionEnum = new EnumField();
|
||||
conditionEnum.BindProperty(conditionProperty);
|
||||
conditionEnum.style.flexGrow = 1;
|
||||
|
||||
var levelProperty = property.FindPropertyRelative("level");
|
||||
var levelInt = new IntegerField();
|
||||
levelInt.BindProperty(levelProperty);
|
||||
|
||||
// Add fields to the group
|
||||
fieldsGroup.Add(conditionEnum);
|
||||
fieldsGroup.Add(levelInt);
|
||||
|
||||
// Add fields group to the main container
|
||||
fieldsContainer.Add(fieldsGroup);
|
||||
|
||||
// Add container to root
|
||||
root.Add(fieldsContainer);
|
||||
|
||||
// Register value change callbacks
|
||||
conditionEnum.RegisterValueChangedCallback(evt =>
|
||||
{
|
||||
// Refresh the level field visibility based on condition
|
||||
var condition = (ETutorialShowCondition)evt.newValue;
|
||||
levelInt.style.display = condition == ETutorialShowCondition.Level ?
|
||||
DisplayStyle.Flex : DisplayStyle.None;
|
||||
|
||||
property.serializedObject.ApplyModifiedProperties();
|
||||
});
|
||||
|
||||
// Initial setup of level field visibility
|
||||
var initialCondition = (ETutorialShowCondition)conditionProperty.enumValueIndex;
|
||||
levelInt.style.display = initialCondition == ETutorialShowCondition.Level ?
|
||||
DisplayStyle.Flex : DisplayStyle.None;
|
||||
|
||||
return root;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 2325f08eaa0b4c128ab6bb851d423377
|
||||
timeCreated: 1749296625
|
||||
@ -0,0 +1,59 @@
|
||||
// // ©2015 - 2025 Candy Smith
|
||||
// // All rights reserved
|
||||
// // Redistribution of this software is strictly not allowed.
|
||||
// // Copy of this software can be obtained from unity asset store only.
|
||||
// // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// // FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
// // THE SOFTWARE.
|
||||
|
||||
using System;
|
||||
using UnityEngine;
|
||||
using UnityEngine.Serialization;
|
||||
|
||||
namespace WordsToolkit.Scripts.Settings
|
||||
{
|
||||
public class GameSettings : SettingsBase
|
||||
{
|
||||
[Header("On start")]
|
||||
public int coins = 200;
|
||||
public int gems = 10;
|
||||
|
||||
[Header("Monetization")]
|
||||
public bool enableAds = true;
|
||||
public bool enableInApps = true;
|
||||
public bool enableLuckySpin = true;
|
||||
|
||||
[Header("GDPR settings")]
|
||||
public string privacyPolicyUrl;
|
||||
|
||||
[Header("Continue time settings")]
|
||||
public int continuePrice = 15;
|
||||
public float continueTime = 15;
|
||||
|
||||
[FormerlySerializedAs("gemsPerExtraWord")]
|
||||
[Tooltip("Gems awarded per extra word found")]
|
||||
public int gemsForExtraWords = 5;
|
||||
|
||||
[Tooltip("Gems awarded when consuming a gift")]
|
||||
public int gemsForGift = 10;
|
||||
|
||||
[Header("Boost settings")]
|
||||
public int hammerBoostPrice = 200;
|
||||
public int hintBoostPrice = 200;
|
||||
public int countOfBoostsToBuy = 3;
|
||||
[Header("Boost button available from levels")]
|
||||
public BoostLevel[] boostLevels;
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class BoostLevel
|
||||
{
|
||||
[TagFieldUI]
|
||||
public string tag;
|
||||
public int level;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 3bde591f474e4a46b1e3e9ae39e552ca
|
||||
timeCreated: 1725685781
|
||||
@ -0,0 +1,24 @@
|
||||
using System;
|
||||
using UnityEngine;
|
||||
using WordsToolkit.Scripts.Data;
|
||||
using WordsToolkit.Scripts.Popups.RewardsGift;
|
||||
|
||||
namespace WordsToolkit.Scripts.Settings
|
||||
{
|
||||
public class GiftsSettings : ScriptableObject
|
||||
{
|
||||
public GiftData[] gifts;
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class GiftData
|
||||
{
|
||||
public GiftBase giftPrefab;
|
||||
public int giftCount;
|
||||
public float giftChance;
|
||||
public ResourceObject resourceObject;
|
||||
[TagFieldUI]
|
||||
public string tagUIElement;
|
||||
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 9fd026f71fe24058b8204312b9d30010
|
||||
timeCreated: 1748331978
|
||||
@ -0,0 +1,20 @@
|
||||
// // ©2015 - 2025 Candy Smith
|
||||
// // All rights reserved
|
||||
// // Redistribution of this software is strictly not allowed.
|
||||
// // Copy of this software can be obtained from unity asset store only.
|
||||
// // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// // FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
// // THE SOFTWARE.
|
||||
|
||||
using UnityEngine;
|
||||
|
||||
namespace WordsToolkit.Scripts.Settings
|
||||
{
|
||||
public abstract class SettingsBase : ScriptableObject
|
||||
{
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a65c9366d0d7441f902cf49138deed15
|
||||
timeCreated: 1725684603
|
||||
@ -0,0 +1,31 @@
|
||||
// // ©2015 - 2025 Candy Smith
|
||||
// // All rights reserved
|
||||
// // Redistribution of this software is strictly not allowed.
|
||||
// // Copy of this software can be obtained from unity asset store only.
|
||||
// // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// // FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
// // THE SOFTWARE.
|
||||
|
||||
using System;
|
||||
using WordsToolkit.Scripts.Data;
|
||||
using WordsToolkit.Scripts.Popups.Reward;
|
||||
|
||||
namespace WordsToolkit.Scripts.Settings
|
||||
{
|
||||
public class SpinSettings : SettingsBase
|
||||
{
|
||||
public RewardSettingSpin[] rewards = Array.Empty<RewardSettingSpin>();
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class RewardSettingSpin
|
||||
{
|
||||
public ResourceObject resource;
|
||||
public RewardVisual rewardVisualPrefab;
|
||||
public int count;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: dc3a7fad003f41b9ac029425b4d01382
|
||||
timeCreated: 1691992529
|
||||
@ -0,0 +1,54 @@
|
||||
using System;
|
||||
using UnityEngine;
|
||||
using UnityEngine.Serialization;
|
||||
using WordsToolkit.Scripts.GUI;
|
||||
using WordsToolkit.Scripts.GUI.Tutorials;
|
||||
|
||||
namespace WordsToolkit.Scripts.Settings
|
||||
{
|
||||
public class TutorialSettings : ScriptableObject
|
||||
{
|
||||
public TutorialSettingsData[] tutorialSettings;
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class TutorialSettingsData
|
||||
{
|
||||
public TutorialKind kind;
|
||||
public TutorialShowCondition showCondition;
|
||||
public TutorialPopupBase popup;
|
||||
[TagFieldUI]
|
||||
public string[] tagsToShow;
|
||||
|
||||
public string GetID()
|
||||
{
|
||||
return $"_{string.Join("_", tagsToShow)}";
|
||||
}
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class TutorialShowCondition
|
||||
{
|
||||
public ETutorialShowCondition showCondition;
|
||||
public int level;
|
||||
}
|
||||
|
||||
public enum TutorialKind
|
||||
{
|
||||
TipBoosterButton,
|
||||
HammerBoosterButton,
|
||||
ExtraWordsButton,
|
||||
GiftButton,
|
||||
ShuffleButton,
|
||||
RedGem,
|
||||
GameTutorial,
|
||||
TimeTutorial
|
||||
}
|
||||
|
||||
public enum ETutorialShowCondition
|
||||
{
|
||||
Level,
|
||||
Event,
|
||||
FirstAppearance,
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ac3d5fd58fe34d76828dc6ba77a3ceae
|
||||
timeCreated: 1748095656
|
||||
Reference in New Issue
Block a user