// Use this for initialization void Start() { seq = action.Sequence(); var spriteRend = GetComponent <SpriteRenderer>(); spriteRend.enabled = true; spriteRend.color = startColor; // Fade in out of black into splashScreen var spriteColorRef = ffSpriteColor; seq.Property(spriteColorRef, spriteColorRef.Val.MakeClear(), FFEase.E_Continuous, fadeInTime); seq.Sync(); // delay for wait time seq.Delay(waitTime); seq.Sync(); // show text var textColorRef = new FFRef <Color>(() => pressAnyKeyText.color, (v) => pressAnyKeyText.color = v); textColorRef.Setter(textColorRef.Val.MakeClear()); seq.Property(textColorRef, textColorRef.Val.MakeOpaque(), FFEase.E_Continuous, 0.45f); // Update Sequence for press any key seq.Sync(); seq.Call(UpdateSeq); }
// Use this for initialization void Start() { if (PathToFollow != null && PathToFollow.points.Length > 1) { movementSeq = action.Sequence(); audioSeq = action.Sequence(); transform.position = PathToFollow.PointAlongPath(PathToFollow.LengthAlongPathToPoint(currentPointNumber)); movementSeq.Call(WaitForInput); } else { if (PathToFollow != null) { Debug.Log("ExComicController has a path which has " + PathToFollow.points.Length + " points which is invalid."); } else { Debug.Log("EXComicController has no path to follow"); } } PlayAudio(); }
// Use this for initialization void Start() { // Initialize { FadeSequence = action.Sequence(); } // Fade Sequence { FadeSequence.Property( ffSpriteColor, new Color(ffSpriteColor.Val.r, ffSpriteColor.Val.g, ffSpriteColor.Val.b, 0.0f), FFEase.E_SmoothStart, OpenFadeTime); FadeSequence.Sync(); FadeSequence.Delay(PreFadeTime); FadeSequence.Sync(); if (trigger == FadeTrigger.KeyPress) { InputUpdate(); } else { FFMessage <TriggerFade> .Connect(OnTriggerFade); } } }
// Use this for initialization void Start() { mConvertMaybe = action.Sequence(); myRidigBody = GetComponent <Rigidbody>(); mPlayers = FindObjectsOfType <ControllerPlayerController>(); mAllLights = FindObjectsOfType <LightChecker>(); mTarget = GetTarget(); }
// Use this for initialization void Start() { movementSeq = action.Sequence(); sizeSeq = action.Sequence(); Update(); sizeSeq.TimeWarpAhead(1.6f); movementSeq.TimeWarpAhead(1.6f); }
// Use this for initialization void Start() { if (Paths.Length > 0) { seq = action.Sequence(); seq.Call(WaitForInput); currentPath = Paths[0].GetComponent <FFPath>(); } }
// Use this for initialization void Start() { myRidigBody = GetComponent <Rigidbody>(); if (!mFlareDropper) { transform.Find("Light").GetComponent <Light>().intensity = startingIntc; } stuffImDoing = action.Sequence(); stuffImDoing.Call(CheckAButton); stuffImDoing.Sync(); }
public void SayThing(FFAction.ActionSequence dialogSeq, string text, float time) { Debug.Log("Say Thing"); TextItem item = new TextItem(); item.dialogSeq = dialogSeq; item.text = text; item.time = time; dialogSeq.Sync(); dialogSeq.Call(Say, item); }
public void FireBullet(double time, FFVector3 position) { // Fire transform.position = position; moveSequence = action.Sequence(); moveSequence.TimeWarpFrom(time); FireSequenceCall(); // Death deathSequence = action.Sequence(); deathSequence.Delay(TimeToLive); deathSequence.Sync(); deathSequence.Call(DestroyBullet); }
void activate(ActivateEnemiesEvent e) { if (!active) { if (seq == null) // first activate { seq = action.Sequence(); seq.Call(Stage1); } else seq.Resume(); active = true; } }
void TriggerDeathSequence() { deathSequence = action.Sequence(); // animation,sounds,disable colliders,etc... Collider col; if (col = GetComponent <Collider>()) { col.enabled = false; } deathSequence.Sync(); // finish all of sequence before destroying GameObject deathSequence.Call(gameObject.Destroy); }
// Use this for initialization void Start() { seq = action.Sequence(); seq.Property(ffposition, Vector3.zero, FFEase.E_Continuous, 1.0f); seq.Property(ffposition, Vector3.zero, FFEase.E_Continuous, 1.0f); seq.Delay(2.0f); seq.Sync(); seq.Property(ffrotation, Quaternion.identity, curve, 1.0f); seq.Delay(0.5f); seq.Sync(); seq.Property(ffscale, Vector3.one * 2.0f, FFEase.E_Continuous, 1.0f); seq.Sync(); seq.Call(DestroyMe); }
void activate(ActivateEnemiesEvent e) { if (!active) { if (seq == null) // first activate { seq = action.Sequence(); seq.Call(Stage1); } else { seq.Resume(); } active = true; } }
int activate(ActivateEnemiesEvent e) { if (!active) { if (seq == null && seq1 == null) // first activate { seq = action.Sequence(); seq1 = action.Sequence(); seq.Call(Stage1); seq1.Call(Report); } else { seq.Resume(); seq1.Resume(); } active = true; } return(0); }
void Awake() { bool localNetObject = FFSystem.RegisterNetGameObject(gameObject, "Player"); // Make Sequences MoveSeq = action.Sequence(); // Update Sequence // Input Events only if object was created by local source if (localNetObject) { FFMessage<FFLocalEvents.UpdateEvent>.Connect(OnUpdateEvent); PositionUpdateSeq = action.Sequence(); PositionUpdateSeq.Call(UpdatePositionCall); } FFMessageBoard<ExPlayerPositionUpdate>.Connect(OnPlayerPositionUpdate, gameObject); FFMessageBoard<ExPlayerMoveAction>.Connect(OnPlayerMoveAction, gameObject); FFMessageBoard<ExPlayerFireAction>.Connect(OnPlayerFireAction, gameObject); }
// Use this for initialization void Start() { updateDialogSeq = action.Sequence(); dialogSequence = action.Sequence(); // Add mapping to dictionary foreach (var mapping in OratorMapping) { if (mapping.name != OratorNames.None && mapping.trans != null) { Orators.Add(mapping.name, mapping.trans); } } // Add Dialogs { foreach (Transform child in transform) { var cd = child.GetComponent <CharacterDialog>(); if (cd != null) { AddCharacterDialog(cd); } } } // Listen to events FFMessage <EnterParty> .Connect(OnEnterParty); FFMessage <LeaveParty> .Connect(OnLeaveParty); FFMessage <EnterArea> .Connect(OnEnterArea); FFMessage <LeaveArea> .Connect(OnLeaveArea); // Start update of dialogs UpdateDialog(); }
void Awake() { bool localNetObject = FFSystem.RegisterNetGameObject(gameObject, "Player"); // Make Sequences MoveSeq = action.Sequence(); // Update Sequence // Input Events only if object was created by local source if (localNetObject) { FFMessage <FFLocalEvents.UpdateEvent> .Connect(OnUpdateEvent); PositionUpdateSeq = action.Sequence(); PositionUpdateSeq.Call(UpdatePositionCall); } FFMessageBoard <ExPlayerPositionUpdate> .Connect(OnPlayerPositionUpdate, gameObject); FFMessageBoard <ExPlayerMoveAction> .Connect(OnPlayerMoveAction, gameObject); FFMessageBoard <ExPlayerFireAction> .Connect(OnPlayerFireAction, gameObject); }
void Start() { // Set referece to 0 for initialization SetVelocityRef(new FFVar <Vector3>(Vector3.zero)); if (dynAudioPlayer != null) { dynAudioPlayer.SetDynamicValue(new FFRef <float>( () => GetVelocityRef().Getter().magnitude, (v) => { })); } // make sure stuff is on, We have it off from the // start of the level GetComponent <CameraController>().enabled = true; transform.Find("Camera").gameObject.SetActive(true); // Fade Screen { // init fadeScreenSeq = action.Sequence(); fadeScreenSeq.affectedByTimeScale = false; Seq_FadeOutScreenMasks(); } }
private void Start() { seq = action.Sequence(); StartSeq(); }
void Start() { // Events FFMessage<ChangeLevelStateEvent>.Connect(OnChangeLevelStateEvent); FFMessage<GetIPAddressEvent>.Connect(OnGetIPAddressEvent); // Sequence DisconnectSequence = action.Sequence(); // MenuUI if (InputField_PlayerName == null || InputField_ServerIPAddress == null || InputButton_StartNewServer == null || InputButton_JoinServer == null || TextField_IPAddresses == null || TextField_Notice == null) { Debug.LogError("Error, ExLevelController is missing a refernce to a MenuUI object"); return; } // GameUI if(InputButton_LeaveServer == null || TextField_Wave == null || TextField_PlayerNames == null) { Debug.LogError("Error, ExLevelController is missing a refernce to a GameUI object"); return; } // Setup Text Input Events from UI // MenuUI _inputField_playerName = InputField_PlayerName.GetComponent<InputField>(); _inputField_serverIPAddress = InputField_ServerIPAddress.GetComponent<InputField>(); _inputButton_startNewServer = InputButton_StartNewServer.GetComponent<Button>(); _inputButton_joinServer = InputButton_JoinServer.GetComponent<Button>(); _inputButton_quitGame = InputButton_QuitGame.GetComponent<Button>(); _textField_iPAddresses = TextField_IPAddresses.GetComponent<Text>(); _textField_notice = TextField_Notice.GetComponent<Text>(); // GameUI _inputButton_leaveServer = InputButton_LeaveServer.GetComponent<Button>(); _textField_wave = TextField_Wave.GetComponent<Text>(); _textField_playerNames = TextField_PlayerNames.GetComponent<Text>(); // ------------------- Connect to events ------------------------------- // MenuUI _inputField_playerName.onEndEdit.AddListener(OnSubmitPlayerName); _inputField_serverIPAddress.onEndEdit.AddListener(OnSubmitServerIPAddress); _inputButton_startNewServer.onClick.AddListener(OnClickStartNewServer); _inputButton_joinServer.onClick.AddListener(OnClickJoinServer); _inputButton_quitGame.onClick.AddListener(OnClickQuitGame); // GameUI _inputButton_leaveServer.onClick.AddListener(OnClickLeaveServer); // Set Text fields FFClient.GetLocalIPEventStart(); FFClient.GetPublicIPEventStart(); // Set Level State ChangeLevelStateEvent CLSE; CLSE.newState = LevelState.In_Menu; FFMessage<ChangeLevelStateEvent>.SendToLocal(CLSE); }
void Start() { // Events FFMessage <ChangeLevelStateEvent> .Connect(OnChangeLevelStateEvent); FFMessage <GetIPAddressEvent> .Connect(OnGetIPAddressEvent); // Sequence DisconnectSequence = action.Sequence(); // MenuUI if (InputField_PlayerName == null || InputField_ServerIPAddress == null || InputButton_StartNewServer == null || InputButton_JoinServer == null || TextField_IPAddresses == null || TextField_Notice == null) { Debug.LogError("Error, ExLevelController is missing a refernce to a MenuUI object"); return; } // GameUI if (InputButton_LeaveServer == null || TextField_Wave == null || TextField_PlayerNames == null) { Debug.LogError("Error, ExLevelController is missing a refernce to a GameUI object"); return; } // Setup Text Input Events from UI // MenuUI _inputField_playerName = InputField_PlayerName.GetComponent <InputField>(); _inputField_serverIPAddress = InputField_ServerIPAddress.GetComponent <InputField>(); _inputButton_startNewServer = InputButton_StartNewServer.GetComponent <Button>(); _inputButton_joinServer = InputButton_JoinServer.GetComponent <Button>(); _inputButton_quitGame = InputButton_QuitGame.GetComponent <Button>(); _textField_iPAddresses = TextField_IPAddresses.GetComponent <Text>(); _textField_notice = TextField_Notice.GetComponent <Text>(); // GameUI _inputButton_leaveServer = InputButton_LeaveServer.GetComponent <Button>(); _textField_wave = TextField_Wave.GetComponent <Text>(); _textField_playerNames = TextField_PlayerNames.GetComponent <Text>(); // ------------------- Connect to events ------------------------------- // MenuUI _inputField_playerName.onEndEdit.AddListener(OnSubmitPlayerName); _inputField_serverIPAddress.onEndEdit.AddListener(OnSubmitServerIPAddress); _inputButton_startNewServer.onClick.AddListener(OnClickStartNewServer); _inputButton_joinServer.onClick.AddListener(OnClickJoinServer); _inputButton_quitGame.onClick.AddListener(OnClickQuitGame); // GameUI _inputButton_leaveServer.onClick.AddListener(OnClickLeaveServer); // Set Text fields FFClient.GetLocalIPEventStart(); FFClient.GetPublicIPEventStart(); // Set Level State ChangeLevelStateEvent CLSE; CLSE.newState = LevelState.In_Menu; FFMessage <ChangeLevelStateEvent> .SendToLocal(CLSE); }
// Use this for initialization void Start() { fadeSeq = action.Sequence(); FFMessageBoard <ActivateUsableObject> .Connect(OnActivate, gameObject); }
void TriggerDeathSequence() { deathSequence = action.Sequence(); // animation,sounds,disable colliders,etc... Collider col; if (col = GetComponent<Collider>()) col.enabled = false; deathSequence.Sync(); // finish all of sequence before destroying GameObject deathSequence.Call(gameObject.Destroy); }
// Use this for initialization void Start() { stuffImDoing = action.Sequence(); stuffImDoing.Call(CheckAButton); stuffImDoing.Sync(); }
// Use this for initialization void Start() { mMyActionList = action.Sequence(); mMyActionList.Call(SpawnFunction); }