Ejemplo n.º 1
0
    public override void Init()
    {
        base.Init();

        // SoundSource is the referenced SoundDataNode
        if (this.Properties.Values.ContainsKey("SoundDataNode"))
        {
            this.strSoundSource = this.Properties.Values["SoundDataNode"];
        }

        // Audio Source is the prefab name, without the asset bundle reference.
        // This is used to keep track of which audio source is actually playing, so we can turn it on and off.
        if (this.Properties.Values.ContainsKey("AudioSource"))
        {
            this.strAudioSource = this.Properties.Values["AudioSource"];
        }

        // The VideoSource can be an asset bundle or URL. If there is an embedded clip on the Video Player, it'll play that in preference to the URL, but
        // a video in the asset bundle will over-ride
        if (this.Properties.Values.ContainsKey("VideoSource"))
        {
            this.strVideoSource = this.Properties.Values["VideoSource"];
        }

        if (this.Properties.Values.ContainsKey("LootContainerSize"))
        {
            this.vLootContainerSize = StringParsers.ParseVector2i(this.Properties.Values["LootContainerSize"], ',');
        }
        else
        {
            this.vLootContainerSize = new Vector2i(2, 3);
        }
    }