Advertisement
KaiClavier

FleeceContinue.cs [Playmaker Action]

Mar 2nd, 2020
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.95 KB | None | 0 0
  1. // (c) Copyright HutongGames, LLC 2010-2013. All rights reserved.
  2. // Coded by Kai Clavier 2020
  3.  
  4. using UnityEngine;
  5. using System.Collections.Generic;
  6. using System.Text;
  7. using UnityEngine.UI;
  8. using Fleece;
  9.  
  10. namespace HutongGames.PlayMaker.Actions
  11. {
  12.     [ActionCategory("Fleece")]
  13.     [Tooltip("Continues reading.")]
  14.     public class FleeceContinue : FsmStateAction
  15.     {
  16.        
  17.         [RequiredField]
  18.         [CheckForComponent(typeof(GenericDrawstring))]
  19.         public FsmOwnerDefault gameObject;
  20.  
  21.        // public FsmBool includeTags;
  22.         private GenericDrawstring genericDrawstring;
  23.  
  24.         public bool everyFrame;
  25.  
  26.         public override void Reset()
  27.         {
  28.  
  29.         }
  30.  
  31.         public override void OnEnter()
  32.         {
  33.             GameObject go = Fsm.GetOwnerDefaultTarget(gameObject);
  34.             genericDrawstring = go.GetComponent<GenericDrawstring>();
  35.             genericDrawstring.Continue(); //start reading at specified passage
  36.             if (!everyFrame) Finish();
  37.         }
  38.  
  39.         public override void OnUpdate()
  40.         {
  41.  
  42.         }
  43.  
  44.     }
  45. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement