This commit is contained in:
2014-06-16 00:25:35 +04:00
committed by Ivan "KaiSD" Korystin
parent bb1b24e947
commit 441fa25a19
25 changed files with 1110 additions and 1 deletions

View File

@@ -0,0 +1,35 @@
using UnityEngine;
using System.Collections;
public class SampleActions : MonoBehaviour
{
public void Start()
{
Action seq = new ActionRepeat (new ActionSequence(new Action[]
{
new ActionTintBy(new Vector4(-50,50,-50,-50),1),
new ActionParallel(new Action[] {
new ActionMoveBy(new Vector3(10, 0, 0), 1),
new ActionMoveBy(new Vector3(0, 10, 0), 1),
// new ActionRotateBy(new Vector3(90, 0, 0), 1)
}),
new ActionScaleBy(new Vector3(2, 2, 1), 1),
new ActionScaleBy(new Vector3(0.5F, 0.5F, 2), 1),
new ActionDelay(1),
new ActionRepeat(new ActionSequence(new Action[] {
new ActionHide(),
new ActionDelay(0F, 0.2F),
new ActionShow(),
new ActionDelay(0F, 0.2F),
}), 5),
new ActionDelay(1),
new ActionMoveBy(new Vector3(-10, 0, 0), 1),
new ActionDelay(0.5F),
new ActionMoveTo(new Vector3(0, 0, 10), 1),
new ActionScaleTo(new Vector3(2, 2, 2), 1),
new ActionRotateTo(new Vector3(0, 0, 0), 1),
new ActionTintBy(new Vector4(50,-50,50,50),3)
}), 5);
gameObject.SendMessage("AttachAction", seq);
}
}