forked from cgvr/DeltaVR
moved archery range model generation logic to npc script, added corresponding voicelines
This commit is contained in:
@@ -28,7 +28,7 @@ public class ArcheryRange : NetworkBehaviour
|
||||
public float roundLength = 60f;
|
||||
public float targetSpawnTime = 3f;
|
||||
|
||||
public ArcheryRangeModelGenerationController modelGenerationController;
|
||||
public ModelDisplay modelDisplay;
|
||||
public KeyboardManager keyboardManager;
|
||||
|
||||
private List<ArcheryTarget> _targets;
|
||||
@@ -133,14 +133,14 @@ public class ArcheryRange : NetworkBehaviour
|
||||
private ArcheryTarget SpawnTarget(Vector3 randomPos)
|
||||
{
|
||||
GameObject targetObject;
|
||||
if (modelGenerationController.GeneratedModel == null)
|
||||
if (modelDisplay.Model == null)
|
||||
{
|
||||
// spawn default UFO
|
||||
targetObject = Instantiate(targetPrefab, randomPos, Quaternion.identity, null);
|
||||
} else
|
||||
{
|
||||
// spawn generated model
|
||||
targetObject = Instantiate(modelGenerationController.GeneratedModel, randomPos, Quaternion.identity, null);
|
||||
targetObject = Instantiate(modelDisplay.Model, randomPos, Quaternion.identity, null);
|
||||
InitializeArcheryTargetObject(targetObject);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user