Beispiel #1
0
 public void ChangeTiming(TimingNames timingName)
 {
     if (timings.ContainsKey(timingName))
     {
         curTiming    = timings[timingName];
         timeToGlitch = 0;
     }
 }
Beispiel #2
0
    // Use this for initialization
    void Start()
    {
        SetupTimings();

        texts.AddRange(GameObject.FindObjectsOfType <GlitchText>());

        curTiming = timings[TimingNames.Standard]; //dEbug for now

        timeToGlitch = UnityEngine.Random.Range(curTiming.timeToMin, curTiming.timeToMax);
    }
Beispiel #3
0
    void SetupTimings()
    {
        GlitchTiming t = new GlitchTiming();

        t.timeToMin  = 20f;
        t.timeToMax  = 70f;
        t.sustainMin = 0.1f;
        t.sustainMax = 0.4f;

        t.textTimeMin    = 2f;
        t.textTimeMax    = 30f;
        t.textSustainMin = 0.03f;
        t.textSustainMax = 0.08f;
        t.name           = TimingNames.Standard;
        timings.Add(t.name, t);

        t = new GlitchTiming();

        t.timeToMin  = 1f;
        t.timeToMax  = 20f;
        t.sustainMin = 0.1f;
        t.sustainMax = 0.4f;

        t.textTimeMin    = 2f;
        t.textTimeMax    = 3f;
        t.textSustainMin = 0.13f;
        t.textSustainMax = 0.28f;
        t.name           = TimingNames.Mystery;
        timings.Add(t.name, t); //THIS IS NOT DONE YET!

        t = new GlitchTiming();

        t.timeToMin  = 1f;
        t.timeToMax  = 5f;
        t.sustainMin = 0.1f;
        t.sustainMax = 1f;

        t.textTimeMin    = 0.01f;
        t.textTimeMax    = 1f;
        t.textSustainMin = 0.01f;
        t.textSustainMax = 0.5f;
        t.name           = TimingNames.Insane;
        timings.Add(t.name, t); //THIS IS NOT DONE YET!
    }