Exemplo n.º 1
0
    public static void Spawn()
    {
        var position = SceneHelper.GetSpawnPosition(Random.Range(3, 6));

        position.Set(position.x * SceneHelper.GetRandomMultiplier(), position.y); // spawn from left side as well
        var ufo = ResourcesLoader.GetUFO();

        Instantiate(ufo, position, Quaternion.identity);
    }
Exemplo n.º 2
0
 private Vector2 GetRandomSpawnPosition()
 {
     return(SceneHelper.GetSpawnPosition(Random.Range(0, SceneHelper.SpawnPositionsCount)));
 }