Exemple #1
0
 public void GenerateGhosts()
 {
     foreach (var dead in deads)
     {
         if (Random.value > ghostSpawnProbability + dayNightCycle.GetCurrentDay() * 0.1f)
         {
             continue;
         }
         var ghost = Instantiate(ghostPrefab, dead.position, dead.rotation);
         ghost.transform.parent = ghostParent;
         ghosts.Add(ghost);
     }
 }
Exemple #2
0
    public override void StartNewDay(DayNightCycle cycle)
    {
        if (cycle.GetCurrentDay() % 3 == 2)
        {
            List <int> characters = new List <int>();
            if (!angelEnabled)
            {
                characters.Add(angelID);
            }

            if (!jacqueEnabled)
            {
                characters.Add(jacqueID);
            }

            if (!lysEnabled)
            {
                characters.Add(lysID);
            }

            if (!steelEnabled)
            {
                characters.Add(steelID);
            }

            if (characters.Count > 0)
            {
                characterID        = characters[Random.Range(0, characters.Count - 1)];
                shouldAddCharacter = true;
            }
            else
            {
                characterID        = 0;
                shouldAddCharacter = false;
            }
        }
    }
Exemple #3
0
 public override void StartNewDay(DayNightCycle cycle)
 {
     Debug.Log("Day " + cycle.GetCurrentDay());
 }
Exemple #4
0
 public override void StartNewDay(DayNightCycle cycle)
 {
     print("Day! " + cycle.GetCurrentDay());
 }