Skip to content

Instantly share code, notes, and snippets.

@allanweir
Last active January 9, 2017 20:17
Show Gist options
  • Save allanweir/86f1f5b7d769d05a2232d807d4d5bc24 to your computer and use it in GitHub Desktop.
Save allanweir/86f1f5b7d769d05a2232d807d4d5bc24 to your computer and use it in GitHub Desktop.
SKAction extension for making adding custom easing functions easier
//
// SKTimingFunction.swift
// Studious ToolKit
//
// Created by Allan Weir on 09/01/2017.
// Copyright © 2017 Allan Weir. All rights reserved.
//
import SpriteKit
extension SKAction {
func withEase(_ ease: @escaping SKActionTimingFunction) -> SKAction {
self.timingFunction = ease
return self
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment