12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970 |
- using System;
- using System.Collections;
- using UnityEngine;
- namespace wf
- {
- public static class TweenHash
- {
- public static Hashtable EaseOutQuint(TweenHash.Type type, Vector3 local_pos, float time)
- {
- return iTween.Hash(new object[]
- {
- TweenHash.TypeAsString(type),
- local_pos,
- "islocal",
- true,
- "time",
- time,
- "easeType",
- iTween.EaseType.easeOutQuint
- });
- }
- public static Hashtable EaseOutSine(TweenHash.Type type, Vector3 local_pos, float time)
- {
- return iTween.Hash(new object[]
- {
- TweenHash.TypeAsString(type),
- local_pos,
- "islocal",
- true,
- "time",
- time,
- "easeType",
- iTween.EaseType.easeOutSine
- });
- }
- private static string TypeAsString(TweenHash.Type type)
- {
- string result = string.Empty;
- if (type != TweenHash.Type.Position)
- {
- if (type != TweenHash.Type.Scale)
- {
- if (type == TweenHash.Type.Rotation)
- {
- result = "rotation";
- }
- }
- else
- {
- result = "scale";
- }
- }
- else
- {
- result = "position";
- }
- return result;
- }
- public enum Type
- {
- Position,
- Scale,
- Rotation
- }
- }
- }
|