I'm trying to use trial version and instead of using unity editor I like to use scripting for cutscenes dialogs.
Is there any complete example. I see some examples however I did not found any suitable examples.
my current setup was based on Adventure Creator and I think DS was more suitable my needs and I want to make sure I can use from scripting. (from my point of view altering large sequences in visual editor was painful)
Here for short example. I had lots of those files. (my game a kind of visual novel, there where lots of dialogs and camera works.)
Code: Select all
using AC;
using UnityEngine;
using System.Collections;
public class dialogue_NewGame_PartOne : MonoBehaviour {
public Marker Camera_A_POS_A;
public Marker Camera_A_POS_B;
public Marker Cam_B_Start;
public Marker Camera_B_POS_A;
public Marker Camera_B_POS_B;
public Marker Aldo_Start;
public Marker Lucy_Start;
public Marker Richardo_Start;
public Marker Richardo_POS_B;
public NPC Richard;
public NPC Lucy;
private _Camera _camA;
private _Camera _camB;
public void DialogueStart()
{
// Start Dialog CoRoutine
_camA = GameObject.Find("GameCamera_A").GetComponent<_Camera>();
_camB = GameObject.Find("GameCamera_B").GetComponent<_Camera>();
cameraStartPosition();
StartCoroutine (Coroutine_Dialogue_NewGame ());
}
private IEnumerator Coroutine_Dialogue_NewGame ()
{
KickStarter.player.Teleport(Aldo_Start.transform.position);
Richard.Teleport(Richardo_Start.transform.position);
Lucy.Teleport(Lucy_Start.transform.position);
KickStarter.stateHandler.StartCutscene ();
KickStarter.dialog.StartDialog (Richard, "And you will spend a month in here, because of your new school. Is that so Aldo", false, -1);
while (Richard.isTalking)
{
yield return new WaitForFixedUpdate ();
}
KickStarter.dialog.StartDialog (KickStarter.player, "Yes Mr.Rivera", false, -1);
while (KickStarter.player.isTalking)
{
yield return new WaitForFixedUpdate ();
}
_camA.transform.position = Camera_A_POS_A.transform.position;
_camA.transform.rotation = Camera_A_POS_A.transform.rotation;
KickStarter.mainCamera.Crossfade(0.1f,_camA);
KickStarter.mainCamera.SetGameCamera(_camA,0f);
KickStarter.dialog.StartDialog (Lucy, "Good, it has quite while since we got any visitors isn't it Richard", false, -1);
while (Lucy.isTalking)
{
yield return new WaitForFixedUpdate ();
}
KickStarter.stateHandler.EndCutscene ();
__App.Game.State.SetIntro(1);
GameObject fsm = GameObject.Find("Scene_FiniteStateMachine");
fsm.SendMessage("InitScene");
}
private void cameraStartPosition()
{
_camB.transform.position = Cam_B_Start.transform.position;
_camB.transform.rotation = Cam_B_Start.transform.rotation;
KickStarter.mainCamera.Crossfade(0.1f,_camB);
KickStarter.mainCamera.SetGameCamera(_camB,0f);
}
}
My Humble regards