Giter Club home page Giter Club logo

extension-supersonic's Introduction

Introduction Supersonic OpenFL Extension. (Android + iOS /under development/)

More info on Supersonic: http://developers.supersonic.com/

###How to Install

To install this library, you can simply get the library from haxelib like this:

haxelib git https://github.com/SempaiGames/extension-supersonic
  • Please note that you if do haxelib install extension-supersonic, you won't get the last version of the extension, since the extension is bigger than haxelib max allowed package.

Once this is done, you just need to add this to your project.xml

<android target-sdk-version="22" />

<!-- uncomment the lines defining the ad-network SDK that you want to include on your project-->
<!-- NOTE: You don't want to enable all of them: Your project will be weight too much and you
may end-up getting the Android 64K limit error -->

<set name="adcolony-supersonic" />
<set name="admob-supersonic" />
<set name="applovin-supersonic" />
<set name="chartboost-supersonic" />
<set name="facebook-supersonic" />
<!--
<set name="flurry-supersonic" />
<set name="hyprmx-supersonic" />
<set name="inmobi-supersonic" />
<set name="mediabrix-supersonic" />
<set name="nativex-supersonic" />
<set name="tapjoy-supersonic" />
<set name="unityads-supersonic" />
<set name="vungle-supersonic" />
-->

<haxelib name="extension-supersonic" />

###Simple use Example

// This example show a simple example.

import extension.supersonic.Supersonic;
import extension.supersonic.SupersonicEvent;

class SimpleExample {

	function new(){
		Supersonic.onEvent = onSupersonicEvent;
		Supersonic.init('YOUR-APP-KEY'); // should be something like: 5c33ac32
	}

	public function onSupersonicEvent(e:SupersonicEvent){
		trace("Supersonic Event: type=" + e.type + " | data=" + e.data);
		if(e.type == SupersonicEvent.InterstitialInitSuccess){
			Supersonic.cacheInterstitial();
		}
		if(e.type == SupersonicEvent.RewardedVideoAdRewarded){
			var pi = e.getPlacementInfo();
			if(pi!=null) pi.dump();
		}
	}

	function gameOver() {
		if(Supersonic.isInterstitialReady()){
			trace("Interstitial is ready!");
			Supersonic.showInterstitial("PLACEMENT-NAME");
			Supersonic.cacheInterstitial();
		}
	}

	function playRewardedVideo() {
		if(Supersonic.isRewardedVideoAvailable() && !Supersonic.isRewardedVideoPlacementCapped("PLACEMENT-NAME")){
			trace("Rewarded Video available");
			Supersonic.showRewardedVideo("PLACEMENT-NAME");
		}
	}
	
}

###License

The MIT License (MIT) - LICENSE.md

Copyright © 2016 SempaiGames (http://www.sempaigames.com)

Author: Federico Bricker

extension-supersonic's People

Contributors

fbricker avatar man2 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.