Implement player spawning in predefined location in lobby and levels
This commit is contained in:
35
Assets/Scripts/Components/DrawGizmoComponent.cs
Normal file
35
Assets/Scripts/Components/DrawGizmoComponent.cs
Normal file
@@ -0,0 +1,35 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
public class DrawGizmoComponent : MonoBehaviour
|
||||
{
|
||||
enum Gizmo
|
||||
{
|
||||
WireCube,
|
||||
WireSphere
|
||||
}
|
||||
|
||||
[SerializeField]
|
||||
private Gizmo gizmo = Gizmo.WireCube;
|
||||
|
||||
[SerializeField]
|
||||
private Color color = Color.yellow;
|
||||
|
||||
private void OnDrawGizmos()
|
||||
{
|
||||
Gizmos.color = color;
|
||||
|
||||
switch (gizmo)
|
||||
{
|
||||
case Gizmo.WireCube:
|
||||
Gizmos.DrawWireCube(transform.position, new Vector3(1, 1, 1));
|
||||
break;
|
||||
|
||||
case Gizmo.WireSphere:
|
||||
Gizmos.DrawWireSphere(transform.position, 0.5f);
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
11
Assets/Scripts/Components/DrawGizmoComponent.cs.meta
Normal file
11
Assets/Scripts/Components/DrawGizmoComponent.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 5e732ef29fd8bdb4ba5e27e9279950a3
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Reference in New Issue
Block a user