Subversion Repository Public Repository

Nextrek

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
/*
 *
 *	Adventure Creator
 *	by Chris Burton, 2013-2014
 *	
 *	"PlayMakerIntegration.cs"
 * 
 *	This script contains static functions for use
 *	in calling PlayMaker FSMs.
 *
 *	To allow for PlayMaker integration, the 'PlayMakerIsPresent'
 *	preprocessor must be defined.  This can be done from
 *	Edit -> Project Settings -> Player, and entering
 *	'PlayMakerIsPresent' into the Scripting Define Symbols text box
 *	for your game's build platform.
 * 
 */

using UnityEngine;
using System.Collections;

public class PlayMakerIntegration : ScriptableObject
{
	
	public static bool IsDefinePresent ()
	{
		#if PlayMakerIsPresent
		return true;
		#else
		return false;
		#endif
	}


	public static void CallEvent (GameObject linkedObject, string eventName)
	{
		#if PlayMakerIsPresent

		if (linkedObject.GetComponent <PlayMakerFSM>())
		{
			PlayMakerFSM playMakerFSM = linkedObject.GetComponent <PlayMakerFSM>();
			playMakerFSM.Fsm.Event (eventName);
		}

		#endif
	}

}

Commits for Nextrek/SpaceCrew/SpaceCrew/Assets/AdventureCreator/Scripts/Static/PlayMakerIntegration.cs

Diff revisions: vs.
Revision Author Commited Message
83 FMMortaroli picture FMMortaroli Tue 13 May, 2014 11:32:51 +0000