Playmaker Forum

PlayMaker Updates & Downloads => Share New Actions => Topic started by: msc4tech on December 06, 2011, 05:13:54 AM

Title: 2d toolkit resume animation
Post by: msc4tech on December 06, 2011, 05:13:54 AM
using UnityEngine;

namespace HutongGames.PlayMaker.Actions
{
   [ActionCategory("2D Toolkit")]
   [Tooltip("Resume a sprite animation on a tk2dAnimatedSprite")]
   public class Resume2dToolkitAnim : FsmStateAction {
      [RequiredField]
      public FsmOwnerDefault gameObject;   
      
      
      private GameObject go;
      private tk2dAnimatedSprite spriteAnim;
      
      public override void Reset() {
         gameObject = null;
      }
      
      public override void OnEnter() {
         go = gameObject.OwnerOption == OwnerDefaultOption.UseOwner ? Owner : gameObject.GameObject.Value;
         spriteAnim = go.GetComponent<tk2dAnimatedSprite>();
         if (spriteAnim.paused ==true)
         {
            spriteAnim.Resume();
         }
         Finish();
      }
   }
   
}
Title: Re: 2d toolkit resume animation
Post by: jeanfabre on January 13, 2012, 03:10:06 AM
Hi Everyone,

 I have started porting 2d toolkit and currently gathering custom actions. The package will be available very soon :)

 Meanwhile, if you have wishes or requests for 2d toolkit and playmaker, this is the right time to ask for it :)

 Thanks for ms4Tech for the head start on them actions.

https://hutonggames.fogbugz.com/default.asp?W717 (https://hutonggames.fogbugz.com/default.asp?W717)

 Bye,

 Jean