Skip to content

Instantly share code, notes, and snippets.

@nopitech
nopitech / SmoothStep.cs
Last active October 30, 2017 13:08
Mathf.SmoothStep
public class TestScript : MonoBehaviour
{
public float speed = 0.3f;
void Start()
{
}
void Update()
@nopitech
nopitech / SmoothDamp.cs
Last active October 30, 2017 13:08
Mathf.SmoothDamp
public class TestScript : MonoBehaviour
{
public Vector3 target;
public float smoothTime = 1f;
public float yVelocity = 0.0f;
void Start()
{
}
@nopitech
nopitech / Shake.cs
Last active October 30, 2017 13:08
iTween.ShakePosition
public class Shake : MonoBehaviour {
public void ShakeObject()
{
// このスクリプトはカメラに付けています。
iTween.ShakePosition(gameObject, iTween.Hash("x", 0.3f, "y", 0.3f, "time", 0.5f));
}
}
@nopitech
nopitech / PunchPosition.cs
Last active October 30, 2017 13:08
iTween.PunchPosition
public class iTweenMethod : MonoBehaviour {
void Start ()
{
PunchPosition ();
}
void PunchPosition()
{
iTween.PunchPosition (gameObject,
@nopitech
nopitech / PunchRotation.cs
Last active October 30, 2017 13:08
iTween.PunchRotation
public class iTweenMethod : MonoBehaviour {
void Start ()
{
PunchRotation ();
}
void PunchRotation()
{
iTween.PunchRotation (gameObject,
@nopitech
nopitech / PunchScale.cs
Created October 19, 2017 16:49
iTween.PunchScale
public class iTweenMethod : MonoBehaviour {
void Start ()
{
PunchScale();
}
void PunchScale()
{
iTween.PunchScale (gameObject,
@nopitech
nopitech / ShakeRotation.cs
Created October 19, 2017 16:57
iTween.ShakeRotation
public class iTweenMethod : MonoBehaviour
{
void Start()
{
ShakeRotation();
}
void ShakeRotation()
{
@nopitech
nopitech / ShakeScale.cs
Created October 19, 2017 17:04
iTween.ShakeScale
public class iTweenMethod : MonoBehaviour
{
void Start()
{
ShakeScale();
}
void ShakeScale()
{
@nopitech
nopitech / ValueTo.cs
Created October 19, 2017 17:23
iTween.ValueTo
public class iTweenMethod : MonoBehaviour
{
// UI Image
public Image image;
// 最初の色と最後の色を選択
public Color startColor;
public Color endColor;
void Start()
@nopitech
nopitech / MoveTo.cs
Created October 21, 2017 09:45
iTween.MoveTo
public class iTweenMethod : MonoBehaviour
{
void Start()
{
// パターン1
iTween.MoveTo(gameObject, iTween.Hash("x", 2f, "delay", 1f));
}
}