Beispiel #1
0
    private void SpawnMob(MobSpawnPreset preset)
    {
        var obj = Instantiate(preset.Mob.MobPrefab, RandomPos(preset), Quaternion.identity);

        obj.transform.SetParent(parentTransform, false);
        //LevelScaler.ScaleLevel(ref mobArray[0], 1);
    }
Beispiel #2
0
    public static void ScaleLevel(ref MobSpawnPreset mob, int level)
    {
        switch (mob.ScaleType)
        {
        case StaticContainer.LevelScaleType.straight: mob.Mob.HP = 15;
            break;

        case StaticContainer.LevelScaleType.none:
            break;
        }
    }
Beispiel #3
0
 private Vector2 RandomPos(MobSpawnPreset preset)
 {
     return(preset.MobPosition + Random.insideUnitCircle * preset.SpawnRadius);
 }