// INTERNALS private void InternalSetupEvent() { if (m_FsmEventTarget == null) { m_FsmEventTarget = new FsmEventTarget(); } // BROADCAST if (m_FsmEventSetup.target == PlayMakerProxyEventTarget.BroadCastAll) { m_FsmEventTarget.target = FsmEventTarget.EventTarget.BroadcastAll; m_FsmEventTarget.excludeSelf = false; } // GAMEOBJECT else if (m_FsmEventSetup.target == PlayMakerProxyEventTarget.GameObject) { m_FsmEventTarget.target = FsmEventTarget.EventTarget.GameObject; m_FsmEventTarget.gameObject = new FsmOwnerDefault(); m_FsmEventTarget.gameObject.OwnerOption = OwnerDefaultOption.SpecifyGameObject; m_FsmEventTarget.gameObject.GameObject.Value = m_FsmEventSetup.gameObject; } // OWNER else if (m_FsmEventSetup.target == PlayMakerProxyEventTarget.Owner) { m_FsmEventTarget.ResetParameters(); m_FsmEventTarget.target = FsmEventTarget.EventTarget.GameObject; m_FsmEventTarget.gameObject = new FsmOwnerDefault(); m_FsmEventTarget.gameObject.OwnerOption = OwnerDefaultOption.SpecifyGameObject; m_FsmEventTarget.gameObject.GameObject.Value = this.gameObject; } }
public override void Reset() { this.eventTarget = null; this.sendEvent = null; this.delay = null; this.everyFrame = false; }
public override void Reset() { eventTarget = null; sendEvent = null; delay = null; everyFrame = false; }
public override void Reset() { base.Reset(); videoComplete = null; videoSkipped = null; eventTarget = FsmEventTarget.Self; }
void rpc_d(string globalEventName, object[] data, PhotonMessageInfo info) // method name used to be too long : RPC_FsmPhotonRpcBroadcastFsmEventWithData { if (LogMessageInfo) { Debug.Log(info.sender.NickName + " sent RPC with " + data.Length + " data variables from Fsm Event:" + globalEventName); } lastrpc_d_data = data; // set the target to be this gameObject. FsmOwnerDefault goTarget = new FsmOwnerDefault(); goTarget.GameObject = new FsmGameObject(); goTarget.GameObject.Value = this.gameObject; goTarget.OwnerOption = OwnerDefaultOption.SpecifyGameObject; // send the event to this gameObject and all its children FsmEventTarget eventTarget = new FsmEventTarget(); eventTarget.excludeSelf = false; eventTarget.target = FsmEventTarget.EventTarget.GameObject; eventTarget.gameObject = goTarget; eventTarget.sendToChildren = true; // create the event. FsmEvent fsmEvent = new FsmEvent(globalEventName); // send the event fsmProxy.Fsm.Event(eventTarget, fsmEvent.Name); // TOFIX: doesn't work if using simply fsmEvent }
public override void Reset() { base.Reset(); restoreDone = null; restoreFailed = null; eventTarget = FsmEventTarget.Self; }
void FireVuforiaEvent(string eventName) { if (debug) { Debug.Log("sending "+eventName+" event to "+this.gameObject.name); } // set the target to be this gameObject. FsmOwnerDefault goTarget = new FsmOwnerDefault(); goTarget.GameObject = new FsmGameObject(); goTarget.GameObject.Value = this.gameObject; goTarget.OwnerOption = OwnerDefaultOption.SpecifyGameObject; // send the event to this gameObject and all its children FsmEventTarget eventTarget = new FsmEventTarget(); eventTarget.excludeSelf = false; eventTarget.target = FsmEventTarget.EventTarget.GameObject; eventTarget.gameObject = goTarget; eventTarget.sendToChildren = true; // create the event. FsmEvent fsmEvent = new FsmEvent(eventName); // send the event fsmProxy.Fsm.Event(eventTarget,fsmEvent.Name); // TOFIX: doesn't work if using simply fsmEvent }
public override void Reset() { gameObject = null; text = null; eventTarget = FsmEventTarget.Self; sendEvent = null; }
public override void Reset() { productName = null; isSuccessEvent = null; isNotSuccessEvent = null; eventTarget = null; isSuccess = null; errorDescription = null; productId = null; cancelDate = null; expireDate = null; freeTrialPeriod = null; introductoryPrice = null; introductoryPricePeriod = null; introductoryPricePeriodCyles = null; purchaseDate = null; remainingTime = null; skuDetails = null; subscriptionPeriod = null; isAutoRenewing = null; isSubscribed = null; isCancelled = null; isExpired = null; isFreeTrial = null; isIntroductoryPricePeriod = null; }
}// OnPhotonInstantiate /// <summary> /// Sends the photon instantiation fsm event to ALL Fsm of the instantiated gameObject AND its children. /// </summary> void sendPhotonInstantiationFsmEvent() { if (debug) { Debug.Log("sending PHOTON INSTANTIATE event to " + this.gameObject.name); } // set the target to be this gameObject. FsmOwnerDefault goTarget = new FsmOwnerDefault(); goTarget.GameObject = new FsmGameObject(); goTarget.GameObject.Value = this.gameObject; goTarget.OwnerOption = OwnerDefaultOption.SpecifyGameObject; // send the event to this gameObject and all its children FsmEventTarget eventTarget = new FsmEventTarget(); eventTarget.excludeSelf = false; eventTarget.target = FsmEventTarget.EventTarget.GameObject; eventTarget.gameObject = goTarget; eventTarget.sendToChildren = true; // create the event. FsmEvent fsmEvent = new FsmEvent("PHOTON / PHOTON INSTANTIATE"); PlayMakerUtils.SendEventToTarget(null, eventTarget, fsmEvent.Name, null); }// sendPhotonInstantiationFsmEvent
public override void Reset() { gameObject = null; eventTarget = null; sendEvent = null; value = null; }
public override void Reset() { base.Reset(); initializationDone = null; initializationFailed = null; eventTarget = FsmEventTarget.Self; }
void rpc_s(string globalEventName, string stringData, PhotonMessageInfo info) // method name used to be too long : RPC_FsmPhotonRpcBroadcastFsmEventWithString { if (LogMessageInfo) { Debug.Log(info.sender.name + " sent RPC string:" + stringData + " from Fsm Event:" + globalEventName); } //lastMessagePhotonPlayer = info.sender; Fsm.EventData.StringData = stringData; // set the target to be this gameObject. FsmOwnerDefault goTarget = new FsmOwnerDefault(); goTarget.GameObject = new FsmGameObject(); goTarget.GameObject.Value = this.gameObject; goTarget.OwnerOption = OwnerDefaultOption.SpecifyGameObject; // send the event to this gameObject and all its children FsmEventTarget eventTarget = new FsmEventTarget(); eventTarget.excludeSelf = false; eventTarget.target = FsmEventTarget.EventTarget.GameObject; eventTarget.gameObject = goTarget; eventTarget.sendToChildren = true; // create the event. FsmEvent fsmEvent = new FsmEvent(globalEventName); // send the event fsmProxy.Fsm.Event(eventTarget, fsmEvent.Name); // TOFIX: doesn't work if using simply fsmEvent }
public override void Reset() { gameObject = null; template = null; name = new FsmString { UseVariable = true }; active = new FsmBool { Value = true }; unique = new FsmBool { Value = false }; replace = new FsmBool { Value = false }; variableNames = new FsmString[0]; variables = new FsmVar[0]; storeComponent = null; existsEventTarget = null; existsSendEvent = null; doNotDestroy = new FsmBool { Value = false }; replaceEventTarget = null; replaceSendEvent = null; }
void SendEvent() { FsmEventData eventData = new FsmEventData(); eventData.StringData = myData; HutongGames.PlayMaker.Fsm.EventData = eventData; FsmEventTarget _eventTarget = new FsmEventTarget(); _eventTarget.excludeSelf = false; FsmOwnerDefault owner = new FsmOwnerDefault(); owner.OwnerOption = OwnerDefaultOption.SpecifyGameObject; owner.GameObject = new FsmGameObject(); owner.GameObject.Value = fsm.gameObject; _eventTarget.gameObject = owner; _eventTarget.fsmComponent = fsm; _eventTarget.target = FsmEventTarget.EventTarget.GameObjectFSM; _eventTarget.sendToChildren = false; fsm.Fsm.Event(_eventTarget, eventName); }
public static void FirePlayMakerEvent(PlayMakerFSM i_Source, string i_EventName, GameObject i_Target, FsmEventData i_EventData) { if (i_EventData != null) { HutongGames.PlayMaker.Fsm.EventData = i_EventData; } if (i_Source == null) { return; } FsmEventTarget eventTarget = new FsmEventTarget(); eventTarget.excludeSelf = false; eventTarget.sendToChildren = true; eventTarget.target = FsmEventTarget.EventTarget.GameObject; FsmOwnerDefault owner = new FsmOwnerDefault(); owner.OwnerOption = OwnerDefaultOption.SpecifyGameObject; owner.GameObject = new FsmGameObject(); owner.GameObject.Value = i_Target; eventTarget.gameObject = owner; i_Source.Fsm.Event(eventTarget, i_EventName); }
public override void Reset() { inactivityThreshold = 5; eventTarget = null; mouseStillEvent = null; mouseMoveEvent = null; }
public override void Reset() { base.Reset(); eventTarget = FsmEventTarget.Self; yes = null; no = null; }
} // OnPhotonInstantiate /// <summary> /// Sends the photon instantiation fsm event to ALL Fsm of the instantiated gameObject AND its children. /// </summary> void sendPhotonInstantiationFsmEvent() { if (debug) { Debug.Log("sending PHOTON INSTANTIATE event to " + this.gameObject.name); } // set the target to be this gameObject. FsmOwnerDefault goTarget = new FsmOwnerDefault(); goTarget.GameObject = new FsmGameObject(); goTarget.GameObject.Value = this.gameObject; goTarget.OwnerOption = OwnerDefaultOption.SpecifyGameObject; // send the event to this gameObject and all its children FsmEventTarget eventTarget = new FsmEventTarget(); eventTarget.excludeSelf = false; eventTarget.target = FsmEventTarget.EventTarget.GameObject; eventTarget.gameObject = goTarget; eventTarget.sendToChildren = true; // create the event. FsmEvent fsmEvent = new FsmEvent("PHOTON / PHOTON INSTANTIATE"); // send the event fsmProxy.Fsm.Event(eventTarget, fsmEvent.Name); // TOFIX: doesn't work if using simply fsmEvent } // sendPhotonInstantiationFsmEvent
private void SendEventToGameObject(string fsmEvent, bool includeChildren, FsmEventData eventData) { if (eventData != null) { HutongGames.PlayMaker.Fsm.EventData = eventData; } if (cachedFsm == null) { return; } FsmEventTarget _eventTarget = new FsmEventTarget(); _eventTarget.excludeSelf = false; _eventTarget.sendToChildren = includeChildren; _eventTarget.target = FsmEventTarget.EventTarget.GameObject; FsmOwnerDefault owner = new FsmOwnerDefault(); owner.OwnerOption = OwnerDefaultOption.SpecifyGameObject; owner.GameObject = new FsmGameObject(); owner.GameObject.Value = this.gameObject; _eventTarget.gameObject = owner; cachedFsm.Fsm.Event(_eventTarget, fsmEvent); }
public static void SendEventToGameObject(PlayMakerFSM fromFsm,GameObject target,string fsmEvent,bool includeChildren,FsmEventData eventData) { if (eventData!=null) { HutongGames.PlayMaker.Fsm.EventData = eventData; } if (fromFsm == null) { return; } FsmEventTarget _eventTarget = new FsmEventTarget(); _eventTarget.excludeSelf = false; FsmOwnerDefault owner = new FsmOwnerDefault(); owner.OwnerOption = OwnerDefaultOption.SpecifyGameObject; owner.GameObject = new FsmGameObject(); owner.GameObject.Value = target; _eventTarget.gameObject = owner; _eventTarget.target = FsmEventTarget.EventTarget.GameObject; _eventTarget.sendToChildren = includeChildren; fromFsm.Fsm.Event(_eventTarget,fsmEvent); }
public void OnDrop(PointerEventData eventData) { if (_dragItem == null) { return; } if (_dropItem != null) { if (_dragItem != null && itemReplacable) { _dropItem.dragSlot = _dragItem.dragSlot; } else { _dropItem.dragSlot = null; } } _dropItem = _dragItem; _dropItem.DropSlot(this); #if PLAYMAKER if (targetFSM != null) { FsmEventTarget fsmEventTarget = new FsmEventTarget(); fsmEventTarget.target = FsmEventTarget.EventTarget.FSMComponent; fsmEventTarget.fsmComponent = targetFSM; targetFSM.Fsm.Event(fsmEventTarget, eventName); } #endif OnDropItem.Invoke(); }
public override void Reset() { base.Reset(); buySuccessful = null; buyFailed = null; eventTarget = FsmEventTarget.Self; }
public static void SendEventToGameObject(PlayMakerFSM fromFsm, GameObject target, string fsmEvent, bool includeChildren, FsmEventData eventData) { if (fromFsm == null) { fromFsm = GetFsmEventSender(); } if (eventData != null) { HutongGames.PlayMaker.Fsm.EventData = eventData; } if (fromFsm == null) { return; } FsmEventTarget _eventTarget = new FsmEventTarget(); _eventTarget.excludeSelf = false; _eventTarget.sendToChildren = includeChildren; _eventTarget.target = FsmEventTarget.EventTarget.GameObject; FsmOwnerDefault owner = new FsmOwnerDefault(); owner.OwnerOption = OwnerDefaultOption.SpecifyGameObject; owner.GameObject = new FsmGameObject(); owner.GameObject.Value = target; _eventTarget.gameObject = owner; fromFsm.Fsm.Event(_eventTarget, fsmEvent); }
public override void Reset() { achievementName = null; isSuccess = false; eventTarget = null; successEvent = null; failureEvent = null; }
public override void Reset() { forwardTo = new FsmEventTarget { target = FsmEventTarget.EventTarget.FSMComponent }; eventsToForward = null; eatEvents = true; }
public override void Reset() { eventTarget = null; setValue = new FsmVar(); sendEvent = null; delay = null; everyFrame = false; }
public override void Reset() { eventTarget = null; sendEvent = null; delayMin = 0f; delayMax = 1f; realTime = true; }
public override void Reset() { forwardTo = new FsmEventTarget { target = FsmEventTarget.EventTarget.FSMComponent }; exceptThese = new[] { FsmEvent.Finished }; eatEvents = true; }
public override void Reset() { eventTarget = null; sendEvent = null; productName = null; productId = null; productType = null; }
public override void Reset() { consentStatus = null; eventTarget = null; isConsentGrantedEvent = null; isConsentRevokedEvent = null; isConsentUnknownEvent = null; }
public override void Reset() { everyFrame = false; isEnable = null; isEnableEvent = null; isNotEnableEvent = null; eventTarget = null; }
public override void Reset() { targetPlayerName = null; // JFF: how can I set this silently without a plubic variable? if I set it to private, it doesn't work anymore. maybe I forgot a setting? eventTarget = new FsmEventTarget(); eventTarget.target = FsmEventTarget.EventTarget.BroadcastAll; remoteEvent = null; stringData = null; }
public override void Reset() { eventTarget = new FsmEventTarget(); eventTarget.target = FsmEventTarget.EventTarget.BroadcastAll; gameObject = null; reference = null; sendEvent = null; excludeSelf = false; sendToChildren = false; }
void sendEventToGO(GameObject _go) { FsmEventTarget _eventTarget = new FsmEventTarget(); _eventTarget.excludeSelf = excludeSelf.Value; FsmOwnerDefault owner = new FsmOwnerDefault(); owner.OwnerOption = OwnerDefaultOption.SpecifyGameObject; owner.GameObject = new FsmGameObject(); owner.GameObject.Value = _go; _eventTarget.gameObject = owner; _eventTarget.target = FsmEventTarget.EventTarget.GameObject; _eventTarget.sendToChildren = sendToChildren.Value; Fsm.Event(_eventTarget,sendEvent); }
// Use this for initialization void Start() { _fsm = FindObjectOfType<PlayMakerFSM>(); if(_fsm == null) _fsm = gameObject.AddComponent<PlayMakerFSM>(); _listView = GetComponent<ListView>(); if(_listView != null) { _listView.OnChangedSelection.AddListener(OnChangedSelection); } _fsmEventTarget = new FsmEventTarget(); _fsmEventTarget.target = FsmEventTarget.EventTarget.BroadcastAll; _fsmEventTarget.excludeSelf = false; }
// Use this for initialization void Start() { _fsm = FindObjectOfType<PlayMakerFSM>(); if(_fsm == null) _fsm = gameObject.AddComponent<PlayMakerFSM>(); _dial = GetComponent<DialControl>(); if(_dial != null) { _dial.OnChangedValue.AddListener(OnChangedValue); } _fsmEventTarget = new FsmEventTarget(); _fsmEventTarget.target = FsmEventTarget.EventTarget.BroadcastAll; _fsmEventTarget.excludeSelf = false; }
// Use this for initialization void Start() { _fsm = FindObjectOfType<PlayMakerFSM>(); if(_fsm == null) _fsm = gameObject.AddComponent<PlayMakerFSM>(); _ironBoy = GetComponent<IronBoyApp>(); if(_ironBoy != null) { _ironBoy.OnConnected.AddListener(OnConnected); _ironBoy.OnConnectionFailed.AddListener(OnConnectionFailed); _ironBoy.OnDisconnected.AddListener(OnDisconnected); _ironBoy.OnLostConnection.AddListener(OnLostConnection); } _fsmEventTarget = new FsmEventTarget(); _fsmEventTarget.target = FsmEventTarget.EventTarget.BroadcastAll; _fsmEventTarget.excludeSelf = false; }
void Awake () { fsmProxy = this.GetComponent<PlayMakerFSM>(); if (fsmProxy==null) { Debug.LogError("'PlayMaker Unity 2D' is missing." ,this); } // set the target to be this gameObject. goTarget = new FsmOwnerDefault(); goTarget.GameObject = new FsmGameObject(); goTarget.OwnerOption = OwnerDefaultOption.SpecifyGameObject; // send the event to this gameObject FsmEventTarget eventTarget = new FsmEventTarget(); eventTarget.excludeSelf = false; eventTarget.target = FsmEventTarget.EventTarget.GameObject; eventTarget.gameObject = goTarget; eventTarget.sendToChildren = false; }
public static bool DoesTargetImplementsEvent(FsmEventTarget target,string eventName) { if (target.target == FsmEventTarget.EventTarget.BroadcastAll) { return FsmEvent.IsEventGlobal(eventName); } if (target.target == FsmEventTarget.EventTarget.FSMComponent) { return DoesFsmImplementsEvent(target.fsmComponent,eventName); } if (target.target == FsmEventTarget.EventTarget.GameObject) { return DoesGameObjectImplementsEvent(target.gameObject.GameObject.Value,eventName); } if (target.target == FsmEventTarget.EventTarget.GameObjectFSM) { return DoesGameObjectImplementsEvent(target.gameObject.GameObject.Value,target.fsmName.Value, eventName); } if (target.target == FsmEventTarget.EventTarget.Self) { Debug.LogError("Self target not supported yet"); } if (target.target == FsmEventTarget.EventTarget.SubFSMs) { Debug.LogError("subFsms target not supported yet"); } if (target.target == FsmEventTarget.EventTarget.HostFSM) { Debug.LogError("HostFSM target not supported yet"); } return false; }
static public void ForwardEventToGameObject(GameObject target,string eventName) { // set the target to be this gameObject. goTarget.GameObject.Value = target; // send the event to this gameObject FsmEventTarget eventTarget = new FsmEventTarget(); eventTarget.target = FsmEventTarget.EventTarget.GameObject; eventTarget.gameObject = goTarget; // create the event FsmEvent fsmEvent = new FsmEvent(eventName); // send the event fsmProxy.Fsm.Event(eventTarget,fsmEvent.Name); // Doesn't work if we pass just the fsmEvent itself. }
public override void Reset() { forwardTo = new FsmEventTarget {target = FsmEventTarget.EventTarget.FSMComponent}; exceptThese = new[] {FsmEvent.Finished}; eatEvents = true; }
void rpc(string globalEventName,PhotonMessageInfo info) // method name used to be too long : RPC_PhotonRpcBroadcastFsmEvent { if (LogMessageInfo) { Debug.Log(info.sender); } //lastMessagePhotonPlayer = info.sender; // set the target to be this gameObject. FsmOwnerDefault goTarget = new FsmOwnerDefault(); goTarget.GameObject = new FsmGameObject(); goTarget.GameObject.Value = this.gameObject; goTarget.OwnerOption = OwnerDefaultOption.SpecifyGameObject; // send the event to this gameObject and all its children FsmEventTarget eventTarget = new FsmEventTarget(); eventTarget.excludeSelf = false; eventTarget.target = FsmEventTarget.EventTarget.GameObject; eventTarget.gameObject = goTarget; eventTarget.sendToChildren = true; // create the event. FsmEvent fsmEvent = new FsmEvent(globalEventName); // send the event fsmProxy.Fsm.Event(eventTarget,fsmEvent.Name); // TOFIX: doesn't work if using simply fsmEvent }
public override void Reset() { eventTarget = new FsmEventTarget(); eventTarget.target = FsmEventTarget.EventTarget.BroadcastAll; content = null; prefab = null; destroyEvent = null; updateEvent = null; everyFrame = false; }
public override void Reset() { eventTarget = null; sendEvent = null; delay = null; }
internal void dispatchEvent(string anEvent,object value,string type) { if (!enablePlayMakerEvents) { return; } switch (type){ case ("bool"): Fsm.EventData.BoolData = (bool)value; break; case ("color"): Fsm.EventData.ColorData = (Color)value; break; case ("float"): Fsm.EventData.FloatData = (float)value; break; case ("gameObject"): Fsm.EventData.ObjectData = (GameObject)value; break; case ("int"): Fsm.EventData.IntData = (int)value; break; case ("material"): Fsm.EventData.MaterialData = (Material)value; break; case ("object"): Fsm.EventData.ObjectData = (Object)value; break; case ("quaternion"): Fsm.EventData.QuaternionData = (Quaternion)value; break; case ("rect"): Fsm.EventData.RectData = (Rect)value; break; case ("string"): Fsm.EventData.StringData = (string)value; break; case ("texture"): Fsm.EventData.TextureData = (Texture)value; break; case ("vector2"): Fsm.EventData.Vector3Data = (Vector3)value; break; case ("vector3"): Fsm.EventData.Vector3Data = (Vector3)value; break; default: //ERROR break; } FsmEventTarget eventTarget = new FsmEventTarget(); eventTarget.target = FsmEventTarget.EventTarget.BroadcastAll; var fsmList = new List<Fsm>(Fsm.FsmList); if (fsmList.Count>0){ Fsm fsmOne = fsmList[0]; fsmOne.Event(eventTarget,anEvent); } //foreach (var fsm in fsmList){fsm.Event(anEvent);} }
void rpc_s(string globalEventName,string stringData,PhotonMessageInfo info) { if (LogMessageInfo) { Debug.Log(info.sender.name+" sent RPC string:"+stringData+" from Fsm Event:"+globalEventName); } //lastMessagePhotonPlayer = info.sender; Fsm.EventData.StringData = stringData; // set the target to be this gameObject. FsmOwnerDefault goTarget = new FsmOwnerDefault(); goTarget.GameObject = new FsmGameObject(); goTarget.GameObject.Value = this.gameObject; goTarget.OwnerOption = OwnerDefaultOption.SpecifyGameObject; // send the event to this gameObject and all its children FsmEventTarget eventTarget = new FsmEventTarget(); eventTarget.excludeSelf = false; eventTarget.target = FsmEventTarget.EventTarget.GameObject; eventTarget.gameObject = goTarget; eventTarget.sendToChildren = true; // create the event. FsmEvent fsmEvent = new FsmEvent(globalEventName); // send the event fsmProxy.Fsm.Event(eventTarget,fsmEvent.Name); // TOFIX: doesn't work if using simply fsmEvent }
void SetupEventTarget() { if (fsmEventTarget==null) { fsmEventTarget = new FsmEventTarget(); } // BROADCAST if (fsmEventSetup.target == PlayMakerProxyEventTarget.BroadCastAll) { fsmEventTarget.target = FsmEventTarget.EventTarget.BroadcastAll; fsmEventTarget.excludeSelf = false; } // FSM COMPONENT else if ( fsmEventSetup.target == PlayMakerProxyEventTarget.FsmComponent) { fsmEventTarget.target = FsmEventTarget.EventTarget.FSMComponent; fsmEventTarget.fsmComponent = fsmEventSetup.fsmComponent; } // GAMEOBJECT else if(fsmEventSetup.target == PlayMakerProxyEventTarget.GameObject) { fsmEventTarget.target = FsmEventTarget.EventTarget.GameObject; fsmEventTarget.gameObject = new FsmOwnerDefault(); fsmEventTarget.gameObject.OwnerOption = OwnerDefaultOption.SpecifyGameObject; fsmEventTarget.gameObject.GameObject.Value = fsmEventSetup.gameObject; } // OWNER else if ( fsmEventSetup.target == PlayMakerProxyEventTarget.Owner) { fsmEventTarget.ResetParameters(); fsmEventTarget.target = FsmEventTarget.EventTarget.GameObject; fsmEventTarget.gameObject = new FsmOwnerDefault(); fsmEventTarget.gameObject.OwnerOption = OwnerDefaultOption.SpecifyGameObject; fsmEventTarget.gameObject.GameObject.Value = this.gameObject; } }
public override void Reset() { gameObject = null; eventTarget = null; eventToSend = null; }
public override void Reset() { boolVariable = null; testBool = true; eventTarget = null; sendEvent = null; delay = null; everyFrame = false; }
/// <summary> /// Sends the photon instantiation fsm event to ALL Fsm of the instantiated gameObject AND its children. /// </summary> void sendPhotonInstantiationFsmEvent() { if (debug) { Debug.Log("sending PHOTON INSTANTIATE event to "+this.gameObject.name); } // set the target to be this gameObject. FsmOwnerDefault goTarget = new FsmOwnerDefault(); goTarget.GameObject = new FsmGameObject(); goTarget.GameObject.Value = this.gameObject; goTarget.OwnerOption = OwnerDefaultOption.SpecifyGameObject; // send the event to this gameObject and all its children FsmEventTarget eventTarget = new FsmEventTarget(); eventTarget.excludeSelf = false; eventTarget.target = FsmEventTarget.EventTarget.GameObject; eventTarget.gameObject = goTarget; eventTarget.sendToChildren = true; // create the event. FsmEvent fsmEvent = new FsmEvent("PHOTON / PHOTON INSTANTIATE"); // send the event fsmProxy.Fsm.Event(eventTarget,fsmEvent.Name); // TOFIX: doesn't work if using simply fsmEvent }