Android Open Source - Sottaceto Event






From Project

Back to project page Sottaceto.

License

The source code is released under:

GNU General Public License

If you think the Android project Sottaceto listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

/*
* Copyright(C) 2013 Giovanni Capuano <webmaster@giovannicapuano.net>
*/*w w  w  . j a  v  a  2 s. c  om*/
* This file is part of Sottaceto.
*
* Sottaceto is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Sottaceto is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Sottaceto.  If not, see <http://www.gnu.org/licenses/>.
*/

package net.giovannicapuano.visualnovel.Types;

import android.annotation.SuppressLint;
import net.giovannicapuano.visualnovel.DialogueType;

public class Event implements DialogueType {
  public enum EventType { SETBACKGROUNDIMAGE, PLAYSOUND, STOPSOUND, SETCHARACTER };

  public EventType name; // Type of the event
  public String resource; // Resource to load
  public boolean loop; // Just for playSound

  @SuppressLint("DefaultLocale")
  public Event(String name, String resource) {
    for(EventType e : EventType.values()) {
      if(name.toUpperCase().equals(e.toString())) {
        this.name = e;
        break;
      }
    }

    this.resource = resource;
  }

  @SuppressLint("DefaultLocale")
  public Event(String name, String resource, boolean loop) {
    for(EventType e : EventType.values()) {
      if(name.toUpperCase().equals(e.toString())) {
        this.name = e;
        break;
      }
    }

    this.resource = resource;
    this.loop = loop;
  }

  @Override
  public String toString() {
    return "Name: " + name + "\nResource: " + resource + (loop ? "\nLoop: " + loop : "");
  }
}




Java Source Code List

net.giovannicapuano.visualnovel.AnimationHandler.java
net.giovannicapuano.visualnovel.Credits.java
net.giovannicapuano.visualnovel.DialogueType.java
net.giovannicapuano.visualnovel.Dialogue.java
net.giovannicapuano.visualnovel.Game.java
net.giovannicapuano.visualnovel.MediaPlayerHandler.java
net.giovannicapuano.visualnovel.Memory.java
net.giovannicapuano.visualnovel.Parser.java
net.giovannicapuano.visualnovel.Start.java
net.giovannicapuano.visualnovel.Utils.java
net.giovannicapuano.visualnovel.Types.Character.java
net.giovannicapuano.visualnovel.Types.Event.java
net.giovannicapuano.visualnovel.Types.GoTo.java
net.giovannicapuano.visualnovel.Types.IfStmt.java
net.giovannicapuano.visualnovel.Types.Player.java