SHARE
TWEET

Untitled




Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
- // (c) Copyright HutongGames, LLC 2010-2013. All rights reserved.
- using UnityEngine;
- namespace HutongGames.PlayMaker.Actions
- {
- [ActionCategory(ActionCategory.GameObject)]
- [Tooltip("Sets the value of a Material Variable.")]
- public class SetMaterial : FsmStateAction
- {
- [RequiredField]
- [UIHint(UIHint.Variable)]
- public FsmMaterial variable;
- public FsmMaterial material;
- public bool everyFrame;
- public override void Reset()
- {
- variable = null;
- material = null;
- everyFrame = false;
- }
- public override void OnEnter()
- {
- variable.Value = material.Value;
- if (!everyFrame)
- {
- Finish();
- }
- }
- public override void OnUpdate()
- {
- variable.Value = material.Value;
- }
- }
- }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy.