This commit is contained in:
Nim XD
2024-08-27 21:01:33 +05:30
parent 99eaf514fd
commit 121a1b7c73
31803 changed files with 623461 additions and 623399 deletions

View File

@@ -1,8 +1,8 @@
fileFormatVersion: 2
guid: b90d38e159b57bb42bbc416e8d4342b3
timeCreated: 1456762715
licenseType: Store
NativeFormatImporter:
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: b90d38e159b57bb42bbc416e8d4342b3
timeCreated: 1456762715
licenseType: Store
NativeFormatImporter:
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,8 +1,8 @@
fileFormatVersion: 2
guid: d1d6350d6015da5408278921d92adee0
timeCreated: 1456762715
licenseType: Store
NativeFormatImporter:
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: d1d6350d6015da5408278921d92adee0
timeCreated: 1456762715
licenseType: Store
NativeFormatImporter:
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,65 +1,65 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Events;
namespace Sveta
{
[System.Serializable]
public class UnityEventString : UnityEvent<string>
{
}
public class ObjectsSwitcher : MonoBehaviour
{
public UnityEventString outputName;
public List<GameObject> list;
private int index = 0;
public void Switch(int delta)
{
index += delta;
if (index > list.Count - 1)
{
index = 0;
}
if (index < 0)
{
index = list.Count - 1;
}
SwitchTo(index);
}
private void SwitchTo(int _index) {
for (int i = 0; i < list.Count; i++)
{
list[i].SetActive(i == _index);
}
outputName?.Invoke(list[_index].name);
}
public void Awake()
{
/*
for (int i = 0; i < list.Count; i++)
{
list[i].gameObject.SetActive(false);
}
list[0].SetActive(true);
*/
SwitchTo(0);
}
}
}
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Events;
namespace Sveta
{
[System.Serializable]
public class UnityEventString : UnityEvent<string>
{
}
public class ObjectsSwitcher : MonoBehaviour
{
public UnityEventString outputName;
public List<GameObject> list;
private int index = 0;
public void Switch(int delta)
{
index += delta;
if (index > list.Count - 1)
{
index = 0;
}
if (index < 0)
{
index = list.Count - 1;
}
SwitchTo(index);
}
private void SwitchTo(int _index) {
for (int i = 0; i < list.Count; i++)
{
list[i].SetActive(i == _index);
}
outputName?.Invoke(list[_index].name);
}
public void Awake()
{
/*
for (int i = 0; i < list.Count; i++)
{
list[i].gameObject.SetActive(false);
}
list[0].SetActive(true);
*/
SwitchTo(0);
}
}
}

View File

@@ -1,56 +1,56 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Events;
[AddComponentMenu("1Enwer/Input/_KeyBoard")]
public class _InputKeyBoard : MonoBehaviour
{
public PressType pressType = PressType.GetKeyDown;
public KeyCodeEvent[] keyBoardGetKey;
public enum PressType
{
GetKey,
GetKeyDown,
GetKeyUp
}
[System.Serializable]
public class KeyCodeEvent
{
public KeyCode keyCode;
public UnityEvent function;
}
// Update is called once per frame
void Update()
{
for (int i = 0; i < keyBoardGetKey.Length; i++)
{
if (KeyBoardIsPressed(pressType, keyBoardGetKey[i].keyCode))
{
keyBoardGetKey[i].function.Invoke();
}
}
}
public bool KeyBoardIsPressed(PressType _pressType, KeyCode keycode)
{
switch (_pressType)
{
case PressType.GetKey:
return Input.GetKey(keycode);
case PressType.GetKeyDown:
return Input.GetKeyDown(keycode);
case PressType.GetKeyUp:
return Input.GetKeyUp(keycode);
default:
return false;
}
}
}
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Events;
[AddComponentMenu("1Enwer/Input/_KeyBoard")]
public class _InputKeyBoard : MonoBehaviour
{
public PressType pressType = PressType.GetKeyDown;
public KeyCodeEvent[] keyBoardGetKey;
public enum PressType
{
GetKey,
GetKeyDown,
GetKeyUp
}
[System.Serializable]
public class KeyCodeEvent
{
public KeyCode keyCode;
public UnityEvent function;
}
// Update is called once per frame
void Update()
{
for (int i = 0; i < keyBoardGetKey.Length; i++)
{
if (KeyBoardIsPressed(pressType, keyBoardGetKey[i].keyCode))
{
keyBoardGetKey[i].function.Invoke();
}
}
}
public bool KeyBoardIsPressed(PressType _pressType, KeyCode keycode)
{
switch (_pressType)
{
case PressType.GetKey:
return Input.GetKey(keycode);
case PressType.GetKeyDown:
return Input.GetKeyDown(keycode);
case PressType.GetKeyUp:
return Input.GetKeyUp(keycode);
default:
return false;
}
}
}

View File

@@ -1,13 +1,13 @@
This asset uses the Built-in Render shader. The built-in render pipeline does not require any updates.
If you want to use this asset in a URP, be sure to apply an update to the URP. Go to the Casual RPG VFX/Upgrade for URP folder and run "Upgrade for URP".
In the URP, to make the demo scenes look like the demo video, you need to use Gamma Space. To do this, go to Edit/Project Setting, tab Player/Other Settings, select in Color Space - Gamma.
If you want to return to Built-in Render, re-import the asset from the Unity Asset Store.
If you have questions or suggestions,
send them to my email: Glowinghuman@gmail.com
Thank you for supporting my work and buying the asset!
This asset uses the Built-in Render shader. The built-in render pipeline does not require any updates.
If you want to use this asset in a URP, be sure to apply an update to the URP. Go to the Casual RPG VFX/Upgrade for URP folder and run "Upgrade for URP".
In the URP, to make the demo scenes look like the demo video, you need to use Gamma Space. To do this, go to Edit/Project Setting, tab Player/Other Settings, select in Color Space - Gamma.
If you want to return to Built-in Render, re-import the asset from the Unity Asset Store.
If you have questions or suggestions,
send them to my email: Glowinghuman@gmail.com
Thank you for supporting my work and buying the asset!
Ratings and reviews are much appreciated :)

View File

@@ -1,31 +1,31 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class UVscroll : MonoBehaviour
{
// Scroll main texture based on time
public int materialId = 0;
public float scrollSpeedX = 0.5f;
public float scrollSpeedY = 0.5f;
Renderer rend;
void Start()
{
rend = GetComponent<Renderer>();
}
void Update()
{
//GetComponent<LineRenderer>().materials[0].
float offsetX = Time.time * scrollSpeedX;
float offsetY = Time.time * scrollSpeedY;
rend.materials[materialId].SetTextureOffset("_MainTex", new Vector2(offsetX, offsetY));
//rend.material.SetTextureOffset("_MainTex", new Vector2(offsetX, offsetY));
}
}
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class UVscroll : MonoBehaviour
{
// Scroll main texture based on time
public int materialId = 0;
public float scrollSpeedX = 0.5f;
public float scrollSpeedY = 0.5f;
Renderer rend;
void Start()
{
rend = GetComponent<Renderer>();
}
void Update()
{
//GetComponent<LineRenderer>().materials[0].
float offsetX = Time.time * scrollSpeedX;
float offsetY = Time.time * scrollSpeedY;
rend.materials[materialId].SetTextureOffset("_MainTex", new Vector2(offsetX, offsetY));
//rend.material.SetTextureOffset("_MainTex", new Vector2(offsetX, offsetY));
}
}