Example #1
0
    /**
     * Default constructor
     */
    public SoundEvent()
    {
        EventName        = "";
        EventDescription = "";

        // Hash the name to optimize names lookup
        EventID = EventName.GetHashCode();

        EventAction = EEventAction.None;
        EventType   = EEventType.Sfx;

        // Add a null element
        EventTargets.Add(null);

        EventIsRandom       = false;
        EventIsLooping      = false;
        EventIsVolumeRandom = false;
        EventIsPitchRandom  = false;

        EventMaxInstance = 1;
        EventVolume      = 0.5f;
        EventPitch       = 1.0f;
        EventToStop      = "";

        EventPitchRandomRange  = Vector2.zero;
        EventVolumeRandomRange = Vector2.zero;
        EventRTPC = null;
    }
Example #2
0
    /**
     * Copy constructor
     */
    public SoundEvent(SoundEvent other)
    {
        EventID          = other.EventID;
        EventName        = other.EventName;
        EventDescription = other.EventDescription;

        EventAction  = other.EventAction;
        EventType    = other.EventType;
        EventTargets = other.EventTargets;

        EventIsRandom       = other.EventIsRandom;
        EventIsLooping      = other.EventIsLooping;
        EventIsVolumeRandom = other.EventIsVolumeRandom;
        EventIsPitchRandom  = other.EventIsPitchRandom;

        EventMaxInstance = other.EventMaxInstance;
        EventVolume      = other.EventVolume;
        EventPitch       = other.EventPitch;
        EventToStop      = other.EventToStop;

        EventPitchRandomRange  = other.EventPitchRandomRange;
        EventVolumeRandomRange = other.EventVolumeRandomRange;
        EventRTPC = other.EventRTPC;
    }