Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // (c) Copyright HutongGames, LLC 2010-2013. All rights reserved.
- // Coded by Kai Clavier 2020
- using UnityEngine;
- using System.Collections.Generic;
- using System.Text;
- using UnityEngine.UI;
- using Fleece;
- namespace HutongGames.PlayMaker.Actions
- {
- [ActionCategory("Fleece")]
- [Tooltip("Begins reading at a specific point.")]
- public class FleeceBegin : FsmStateAction
- {
- [RequiredField]
- [CheckForComponent(typeof(GenericDrawstring))]
- public FsmOwnerDefault gameObject;
- [UIHint(UIHint.Variable)]
- public FsmString passageName;
- //public Jumper startPassage;
- private GenericDrawstring genericDrawstring;
- public bool everyFrame;
- public override void Reset()
- {
- //startPassage = null;
- passageName = null;
- }
- public override void OnEnter()
- {
- GameObject go = Fsm.GetOwnerDefaultTarget(gameObject);
- genericDrawstring = go.GetComponent<GenericDrawstring>();
- genericDrawstring.Begin(passageName.Value); //start reading at specified passage
- if (!everyFrame) Finish();
- }
- public override void OnUpdate()
- {
- }
- }
- }
Add Comment
Please, Sign In to add comment