Esempio n. 1
0
    /**
     * Adds a new effect to the list.
     *
     * @param effect
     *            the effect to be added
     */

    public void add(AbstractEffect effect)
    {
        effects.Add(effect);

        //Check if the effect has resources, to add it in the AllAssetsPaths
        if (effect.getType() == EffectType.PLAY_ANIMATION || effect.getType() == EffectType.PLAY_SOUND ||
            effect.getType() == EffectType.SPEAK_CHAR || effect.getType() == EffectType.SPEAK_PLAYER ||
            effect.getType() == EffectType.SHOW_TEXT)
        {
            AllElementsWithAssets.addAsset(effect);
        }
        else if (effect.getType() == EffectType.RANDOM_EFFECT)
        {
            if (((RandomEffect)effect).getPositiveEffect() != null)
            {
                EffectType peType = ((RandomEffect)effect).getPositiveEffect().getType();
                if (peType == EffectType.PLAY_ANIMATION || peType == EffectType.PLAY_SOUND ||
                    peType == EffectType.SPEAK_CHAR || peType == EffectType.SPEAK_PLAYER ||
                    peType == EffectType.SHOW_TEXT)
                {
                    AllElementsWithAssets.addAsset(((RandomEffect)effect).getPositiveEffect());
                }
            }
            if (((RandomEffect)effect).getNegativeEffect() != null)
            {
                EffectType neType = ((RandomEffect)effect).getNegativeEffect().getType();
                if (neType == EffectType.PLAY_ANIMATION || neType == EffectType.PLAY_SOUND ||
                    neType == EffectType.SPEAK_CHAR || neType == EffectType.SPEAK_PLAYER ||
                    neType == EffectType.SHOW_TEXT)
                {
                    AllElementsWithAssets.addAsset(((RandomEffect)effect).getNegativeEffect());
                }
            }
        }
    }
Esempio n. 2
0
 public void setNameSoundPath(string nameSoundPath)
 {
     this.nameSoundPath = nameSoundPath;
     if (nameSoundPath != null)
     {
         AllElementsWithAssets.addAsset(this);
     }
 }
Esempio n. 3
0
 public void setDetailedDescriptionSoundPath(string detailedDescriptionSoundPath)
 {
     this.detailedDescriptionSoundPath = detailedDescriptionSoundPath;
     if (detailedDescriptionSoundPath != null)
     {
         AllElementsWithAssets.addAsset(this);
     }
 }
Esempio n. 4
0
    /**
     * Creates a new Resources.
     */

    public ResourcesUni()
    {
        assets = new Dictionary <string, string>();
        // add the hash map of asset AllElements with asset
        AllElementsWithAssets.addAsset(assets);
        conditions = new Conditions();
        name       = "No name";
    }
Esempio n. 5
0
 /**
  * Added for v1.4 - soundPath for accessibility purposes
  * @return
  */
 public void setSoundPath(string soundPath)
 {
     this.soundPath = soundPath;
     if (soundPath != null)
     {
         AllElementsWithAssets.addAsset(this);
     }
 }
Esempio n. 6
0
 /**
  * @param cursorPath
  *            the cursorPath to set
  */
 public void setCursorPath(string cursorPath)
 {
     this.cursorPath = cursorPath;
     if (cursorPath != null)
     {
         AllElementsWithAssets.addAsset(this);
     }
 }
Esempio n. 7
0
 /**
  * Adds a paragraph to the book
  *
  * @param paragraph
  *            New paragraph to be added
  */
 public void addParagraph(BookParagraph paragraph)
 {
     paragraphs.Add(paragraph);
     // add the page to the structure that gather all elements with assets (for chapter importation)
     if (paragraph.getType() == BookParagraph.IMAGE)
     {
         AllElementsWithAssets.addAsset(paragraph);
     }
 }
Esempio n. 8
0
    /**
     * @param audioPath
     *            the audioPath to set
     */

    public void setAudioPath(string audioPath)
    {
        this.audioPath = audioPath;

        //if audioPath is not null, store the conversation line
        if (audioPath != null)
        {
            AllElementsWithAssets.addAsset(this);
        }
    }
Esempio n. 9
0
    /**
     * Adds a page to the book
     *
     * @param page
     *            New page (url) to be added
     */

    public void addPage(string uri, int type)
    {
        BookPage page = new BookPage(uri, type);

        pages.Add(page);
        // add the page to the structure that gather all elements with assets (for chapter importation)
        if (uri != null && !uri.Equals(""))
        {
            AllElementsWithAssets.addAsset(page);
        }
    }
Esempio n. 10
0
    /**
     * Adds a page to the book with margin
     *
     * @param page
     *            New page (url) to be added
     */

    public void addPage(string uri, int type, int margin, int marginEnd, int marginTop, int marginBottom, bool scrollable)
    {
        BookPage page = new BookPage(uri, type, margin, marginEnd, marginTop, marginBottom, scrollable);

        pages.Add(page);
        // add the page to the structure that gather all elements with assets (for chapter importation)
        if (type != BookPage.TYPE_URL && uri != null && !uri.Equals(""))
        {
            AllElementsWithAssets.addAsset(page);
        }
    }