-
Notifications
You must be signed in to change notification settings - Fork 97
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
All scripts are now using the namespace "AdultLink"
- Loading branch information
Showing
5 changed files
with
169 additions
and
156 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 12 additions & 9 deletions
21
Assets/AdultLink/TexturePanner/Examples/Scripts/CameraPositions.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,17 @@ | ||
using System.Collections; | ||
using System.Collections.Generic; | ||
using UnityEngine; | ||
namespace AdultLink { | ||
|
||
[System.Serializable] | ||
public class CameraPositions : System.Object { | ||
|
||
[System.Serializable] | ||
public class CameraPositions : System.Object { | ||
public string name; | ||
public Vector3 pos; | ||
public Vector3 rot; | ||
[TextArea(0,5)] | ||
public string description; | ||
|
||
} | ||
|
||
public string name; | ||
public Vector3 pos; | ||
public Vector3 rot; | ||
[TextArea(0,5)] | ||
public string description; | ||
|
||
} | ||
} |
53 changes: 28 additions & 25 deletions
53
Assets/AdultLink/TexturePanner/Examples/Scripts/HueShift.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,38 @@ | ||
using System.Collections; | ||
using System.Collections.Generic; | ||
using UnityEngine; | ||
namespace AdultLink | ||
{ | ||
public class HueShift : MonoBehaviour { | ||
|
||
public class HueShift : MonoBehaviour { | ||
// Use this for initialization | ||
|
||
// Use this for initialization | ||
private Material mat; | ||
public float speed = 5f; | ||
public Color color; | ||
void Start () { | ||
|
||
private Material mat; | ||
public float speed = 5f; | ||
public Color color; | ||
void Start () { | ||
mat = GetComponent<Renderer>().material; | ||
} | ||
|
||
// Update is called once per frame | ||
void FixedUpdate () { | ||
float hue; | ||
float sat; | ||
float value; | ||
Color.RGBToHSV(color, out hue, out sat, out value); | ||
mat.SetColor("_Color", color); | ||
hue += Time.fixedDeltaTime * speed; | ||
|
||
mat = GetComponent<Renderer>().material; | ||
} | ||
|
||
// Update is called once per frame | ||
void FixedUpdate () { | ||
float hue; | ||
float sat; | ||
float value; | ||
Color.RGBToHSV(color, out hue, out sat, out value); | ||
mat.SetColor("_Color", color); | ||
hue += Time.fixedDeltaTime * speed; | ||
if (hue > 1.0f) { | ||
hue = 0f; | ||
} | ||
|
||
if (hue > 1.0f) { | ||
hue = 0f; | ||
} | ||
|
||
if (hue < 0f) { | ||
hue = 1.0f; | ||
} | ||
color = Color.HSVToRGB(hue,sat,1.3f); | ||
if (hue < 0f) { | ||
hue = 1.0f; | ||
} | ||
color = Color.HSVToRGB(hue,sat,1.3f); | ||
} | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,11 @@ | ||
using System.Collections; | ||
using System.Collections.Generic; | ||
using UnityEngine; | ||
namespace AdultLink | ||
{ | ||
public class Index : MonoBehaviour { | ||
|
||
public class Index : MonoBehaviour { | ||
|
||
public int index; | ||
public int index; | ||
} | ||
|
||
} |
41 changes: 22 additions & 19 deletions
41
Assets/AdultLink/TexturePanner/Examples/Scripts/SetColor.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,30 @@ | ||
using System.Collections; | ||
using System.Collections.Generic; | ||
using UnityEngine; | ||
namespace AdultLink | ||
{ | ||
public class SetColor : MonoBehaviour { | ||
|
||
public class SetColor : MonoBehaviour { | ||
|
||
// Use this for initialization | ||
public GameObject[] objects; | ||
public Color newColor; | ||
private Material[] mats; | ||
void Start () { | ||
mats = new Material[objects.Length]; | ||
for (int i = 0; i < objects.Length; i++) { | ||
//Debug.Log(objects[i]); | ||
mats[i] = objects[i].GetComponent<Renderer>().material; | ||
//Debug.Log(mats[i]); | ||
// Use this for initialization | ||
public GameObject[] objects; | ||
public Color newColor; | ||
private Material[] mats; | ||
void Start () { | ||
mats = new Material[objects.Length]; | ||
for (int i = 0; i < objects.Length; i++) { | ||
//Debug.Log(objects[i]); | ||
mats[i] = objects[i].GetComponent<Renderer>().material; | ||
//Debug.Log(mats[i]); | ||
} | ||
} | ||
} | ||
|
||
// Update is called once per frame | ||
void FixedUpdate () { | ||
for (int i = 0; i < mats.Length; i++) { | ||
//Debug.Log(mats[i]); | ||
mats[i].SetColor("_Color", newColor); | ||
// Update is called once per frame | ||
void FixedUpdate () { | ||
for (int i = 0; i < mats.Length; i++) { | ||
//Debug.Log(mats[i]); | ||
mats[i].SetColor("_Color", newColor); | ||
} | ||
} | ||
} | ||
|
||
} |