Ejemplo n.º 1
0
 /// <summary>
 /// Check if moon is up.
 /// </summary>
 /// <param name="i">Moon type to check for.</param>
 /// <param name="tickOffset">Offset to current tick. For example 0 would check if moon is currently up but 1 would check if moon is up in 1 tick.</param>
 /// <returns></returns>
 public bool IsMoonUp(MoonTypes i, int tickOffset)
 {
     if (MoonTimer[(int)i] == -1)
     {
         return(false);
     }
     return((MoonTimer[(int)i] + tickOffset) % MoonInterval[(int)i] >= MoonDuration[(int)i] - 1);
 }
Ejemplo n.º 2
0
    ///  Public Methods
    public override void MoonRiseResponse(MoonTypes moonType)
    {
        switch (moonType)
        {
        case MoonTypes.blueMoon:
            ChangeSpeed(speedBuffMultiplier);
            BecomeInvincible();
            break;

        case MoonTypes.pinkMoon:
            ChangeSpeed(speedDebuffMultiplier);
            break;

        //since I want nothing, I can omitt this:
        case MoonTypes.purpleMoon:
            //do nothing
            break;
        }
    }
Ejemplo n.º 3
0
 public override void MoonSetResponse(MoonTypes moonType)
 {
     //I m resetting the full state in all cases, so I don't differentiate here.
     ResetState();
 }
Ejemplo n.º 4
0
 abstract public void MoonSetResponse(MoonTypes moonType);
Ejemplo n.º 5
0
 abstract public void MoonRiseResponse(MoonTypes moonType);
Ejemplo n.º 6
0
 /// <summary>
 /// Check if we have seen a moon rise or fall.
 /// </summary>
 /// <param name="i">Moon type to check for.</param>
 /// <returns></returns>
 public bool HasSeenMoon(MoonTypes i)
 {
     return(MoonTimer[(int)i] != -1);
 }
Ejemplo n.º 7
0
 public override void MoonSetResponse(MoonTypes moonType)
 {
     //restore resource output to normal
 }
Ejemplo n.º 8
0
 public override void MoonRiseResponse(MoonTypes moonType)
 {
     //raise resource output
 }