public override void Excute(FageStateMachine stateMachine) { base.Excute(stateMachine); GalleryScreen gs = stateMachine as GalleryScreen; if (gs.IsDragging()) { gs.ReserveState("GalleryDragging"); } }
public override void Excute(FageStateMachine stateMachine) { base.Excute(stateMachine); GalleryScreen gs = stateMachine as GalleryScreen; if (!gs.IsDragging()) { RectTransform rt = gs.GetNearestItem(); /** * something */ switch (Random.Range(1, 3)) { case 1: gs.ReserveState("GalleryUnlocked"); break; case 2: gs.ReserveState("GalleryLocked"); break; } } }