Speaking of writing a sequence command. I am trying do exactly do that. My command should flip the object(character) if he walks/looks into the other direction. So I checked the documentation. Sadly most of the scripts are blocked away behind dlls so I can't look at them. MoveTo would have been interesting I guess.
What I try to do is this:
Code: Select all
using UnityEngine;
using System.Collections;
using PixelCrushers.DialogueSystem;
namespace PixelCrushers.DialogueSystem.SequencerCommands {
public class SequencerCommandFlipObject : SequencerCommand {
public void Start() {
// Add your initialization code here. You can use the GetParameter***() and GetSubject()
// functions to get information from the command's parameters. You can also use the
// Sequencer property to access the SequencerCamera, CameraAngle, Speaker, Listener,
// SubtitleEndTime, and other properties on the sequencer. If IsAudioMuted() is true,
// the player has muted audio.
//
// If your sequencer command only does something immediately and then finishes,
// you can call Stop() here and remove the Update() method.
string objectName = GetParameterAsSting(0);
GameObject flipObject = GameObject.Find("objectName");
flipObject.transform.scale.x *= -1;
Stop();
}
}
}
Is there a way to look into the dlls? I am confident that I could figure this one out.