/// <summary>
    /// Play Effect Animation Event
    /// </summary>
    /// <param name="index">Index.</param>
    public void AnimationEvent(string index_pause)
    {
        string[] vars  = index_pause.Split('_');
        int      index = int.Parse(vars [0]);
        float    pause = float.Parse(vars [1]);

        if (animationEventInfos.Count == 0)
        {
            JSHelper.DebugLog("No animation event !");
        }
        else if (animationEventInfos.Count <= index)
        {
            JSHelper.DebugLogError("Animation event index out of limit : " + index);
        }
        else
        {
            if (!animationEventInfos [index].selfParticle)
            {
                ParticleSystem.MainModule main = animationEventInfos [index].particles [0].main;
                main.simulationSpeed = JSTime.Instance.MainGameSceneDeltaTime;
                foreach (ParticleSystem par in animationEventInfos[index].particles)
                {
                    par.Stop();
                    par.Play();
                }

                if (pause > 0)
                {
                    animator.speed = 0;
                    StartCoroutine(DelayContinueAnimator(pause));
                }
            }
        }
    }
 /// <summary>
 /// Animation finish play event
 /// </summary>
 public void FinishEvent(string animationName)
 {
     JSHelper.DebugLog(name + " " + animationName + " finish play");
     if (finishEventHandler != null)
     {
         finishEventHandler();
         finishEventHandler = null;
     }
 }
Exemple #3
0
 public static void CreateDirectory(string fileName)
 {
     if (!IsDirectoryExists(fileName))
     {
         JSHelper.DebugLog(fileName + " Create !");
         Directory.CreateDirectory(fileName);
     }
     else
     {
         JSHelper.DebugLog(fileName + " Exist !");
     }
 }
Exemple #4
0
    public static void CreateFile(string fileName, string content)
    {
        if (IsFileExists(fileName))
        {
            File.Delete(fileName);
        }
        JSHelper.DebugLog(fileName + " Create !");

        StreamWriter streamWriter = File.CreateText(fileName);

        streamWriter.Write(content);
        streamWriter.Close();
    }
Exemple #5
0
 public void OnPointerEnter(PointerEventData eventData)
 {
     JSHelper.DebugLog("Mouse Enter : " + name);
 }