From 804f53c0b65f5b01140956ffa1d6e69f382e1e3a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christer=20War=C3=A9n?= Date: Fri, 21 Feb 2020 04:29:40 +0200 Subject: [PATCH] Pressing NiceCat logo now will open website in a browser, also added two other links already ahead in OpenLink script. --- Jump Game/Assets/Scenes/Scene1_Menu.unity | 68 +++++++++++++++++++ Jump Game/Assets/Scripts/Menu/OpenLink.cs | 23 +++++++ .../Assets/Scripts/Menu/OpenLink.cs.meta | 11 +++ 3 files changed, 102 insertions(+) create mode 100644 Jump Game/Assets/Scripts/Menu/OpenLink.cs create mode 100644 Jump Game/Assets/Scripts/Menu/OpenLink.cs.meta diff --git a/Jump Game/Assets/Scenes/Scene1_Menu.unity b/Jump Game/Assets/Scenes/Scene1_Menu.unity index 98ad0eb..c5d0c98 100644 --- a/Jump Game/Assets/Scenes/Scene1_Menu.unity +++ b/Jump Game/Assets/Scenes/Scene1_Menu.unity @@ -1312,6 +1312,8 @@ GameObject: - component: {fileID: 593435231} - component: {fileID: 593435233} - component: {fileID: 593435232} + - component: {fileID: 593435235} + - component: {fileID: 593435234} m_Layer: 5 m_Name: SVG Image m_TagString: Untagged @@ -1367,6 +1369,72 @@ CanvasRenderer: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 593435230} m_CullTransparentMesh: 0 +--- !u!114 &593435234 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 593435230} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 7d07667923b95c744981ebd5983f1e23, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!114 &593435235 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 593435230} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 3 + m_SelectOnUp: {fileID: 0} + m_SelectOnDown: {fileID: 0} + m_SelectOnLeft: {fileID: 0} + m_SelectOnRight: {fileID: 0} + m_Transition: 1 + m_Colors: + m_NormalColor: {r: 1, g: 1, b: 1, a: 1} + m_HighlightedColor: {r: 1, g: 0.3160377, b: 0.3160377, a: 1} + m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} + m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} + m_ColorMultiplier: 1 + m_FadeDuration: 0.1 + m_SpriteState: + m_HighlightedSprite: {fileID: 0} + m_PressedSprite: {fileID: 0} + m_SelectedSprite: {fileID: 0} + m_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_SelectedTrigger: Selected + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 593435232} + m_OnClick: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 593435234} + m_MethodName: Website + m_Mode: 1 + m_Arguments: + m_ObjectArgument: {fileID: 0} + m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: + m_BoolArgument: 0 + m_CallState: 2 --- !u!224 &650704916 stripped RectTransform: m_CorrespondingSourceObject: {fileID: 4302189230082019122, guid: 849f48437cf3cb841a32cc7467d8a2e5, diff --git a/Jump Game/Assets/Scripts/Menu/OpenLink.cs b/Jump Game/Assets/Scripts/Menu/OpenLink.cs new file mode 100644 index 0000000..b688d01 --- /dev/null +++ b/Jump Game/Assets/Scripts/Menu/OpenLink.cs @@ -0,0 +1,23 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; + +public class OpenLink : MonoBehaviour +{ + public void Website(){ + Application.OpenURL("https://nicecat.wgi.fi"); + } + + public void Website_GamePage(){ + Application.OpenURL("https://nicecat.wgi.fi/jump-game/"); + } + + public void GitRepositories_Github(){ + Application.OpenURL("https://github.com/nicecat-studios/jump-game"); + } + + public void GitRepositories_Gitlab(){ + Application.OpenURL("https://gitlab.com/nicecat-studios/jump-game"); + } + +} diff --git a/Jump Game/Assets/Scripts/Menu/OpenLink.cs.meta b/Jump Game/Assets/Scripts/Menu/OpenLink.cs.meta new file mode 100644 index 0000000..74dd331 --- /dev/null +++ b/Jump Game/Assets/Scripts/Menu/OpenLink.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 7d07667923b95c744981ebd5983f1e23 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: