Exemplo n.º 1
0
 void Awake()
 {
     if (s_instance == null) {
         s_instance = this;
     }
     else {
         Destroy(gameObject);
     }
 }
Exemplo n.º 2
0
 void Awake()
 {
     if (s_instance == null)
     {
         s_instance = this;
     }
     else
     {
         Destroy(gameObject);
     }
 }
Exemplo n.º 3
0
    // Use this for initialization
    void Awake()
    {
        if (self == null)
        {
            DontDestroyOnLoad(gameObject);
            self = this;
        }
        else
        {
            Destroy(gameObject);
        }

        totalAnyLines        = System.Enum.GetValues(typeof(AnyOneLinersKind)).Length / totalVoices;
        totalAcornLines      = System.Enum.GetValues(typeof(AcornOneLinersKind)).Length / totalVoices;
        totalBeetLines       = System.Enum.GetValues(typeof(BeetOneLinersKind)).Length / totalVoices;
        totalCannonLines     = System.Enum.GetValues(typeof(CannonOneLinersKind)).Length / totalVoices;
        totalMissileLines    = System.Enum.GetValues(typeof(MissileOneLinersKind)).Length / totalVoices;
        totalMushboomLines   = System.Enum.GetValues(typeof(MushboomOneLinersKind)).Length / totalVoices;
        totalPillarLines     = System.Enum.GetValues(typeof(PillarOneLinersKind)).Length / totalVoices;
        totalSharktoothLines = System.Enum.GetValues(typeof(SharktoothOneLinersKind)).Length / totalVoices;
        totalTeleportLines   = System.Enum.GetValues(typeof(TeleportOneLinersKind)).Length / totalVoices;

        Reset();
    }