Download the Ecosystem Browser to find new actions, samples. etc.
using UnityEngine;using System.Collections;namespace HutongGames.PlayMaker.Actions{ [ActionCategory("Soul Saga")] [Tooltip("Gets the Y Position of the mouse and stores it in a Float Variable.")] public class CameraScrollWheelZoom : FsmStateAction { [RequiredField] [UIHint(UIHint.Variable)] public FsmFloat floatScroll; public bool everyFrame; public override void Reset() { everyFrame = false; } public override void OnEnter() { DoScroll(); if (!everyFrame) Finish(); } public override void OnUpdate() { DoScroll(); } void DoScroll() { if (floatScroll.Value > 0) { if (Camera.main.orthographicSize <= .6) { Camera.main.orthographicSize = .5f; return; } else { Camera.main.orthographicSize -= .1f; } } if (floatScroll.Value < 0) { if (Camera.main.orthographicSize >= 9.9) { Camera.main.orthographicSize = 10f; return; } else { Camera.main.orthographicSize += .1f; } } } }}