Implemented flashlight
This commit is contained in:
parent
f8abb3dac8
commit
68de921a69
|
@ -0,0 +1,94 @@
|
|||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEngine.InputSystem;
|
||||
|
||||
public class FlashLight : MonoBehaviour
|
||||
{
|
||||
[Header("Config")]
|
||||
[SerializeField] private float _powerDraw;
|
||||
[SerializeField] private float _maxCharge;
|
||||
[SerializeField] private float _range;
|
||||
[SerializeField] private float _angle;
|
||||
[SerializeField] private float _intensity;
|
||||
|
||||
[Header("State")]
|
||||
[SerializeField] private bool _isActive;
|
||||
[field: SerializeField] public float CurrentCharge { get; private set; }
|
||||
[field: SerializeField] private FloatVariable _S_currentCharge;
|
||||
|
||||
[Header("Connection")]
|
||||
[SerializeField] private Light _light;
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
_light = GetComponent<Light>();
|
||||
}
|
||||
|
||||
private void OnEnable()
|
||||
{
|
||||
CurrentCharge = _maxCharge;
|
||||
_light.enabled = false;
|
||||
}
|
||||
|
||||
private void Update()
|
||||
{
|
||||
ToggleFlashlight();
|
||||
|
||||
if (_isActive)
|
||||
{
|
||||
CurrentCharge -= _powerDraw * Time.deltaTime;
|
||||
CurrentCharge = Mathf.Clamp(CurrentCharge, 0, _maxCharge);
|
||||
if (CurrentCharge == 0)
|
||||
{
|
||||
FlashLightOff();
|
||||
}
|
||||
}
|
||||
|
||||
UpdateUI();
|
||||
}
|
||||
|
||||
private void FlashLightOff()
|
||||
{
|
||||
_light.enabled = false;
|
||||
}
|
||||
|
||||
private void FlashLightOn()
|
||||
{
|
||||
_light.enabled = true;
|
||||
}
|
||||
|
||||
private void ToggleFlashlight()
|
||||
{
|
||||
if (Keyboard.current.fKey.wasPressedThisFrame)
|
||||
{
|
||||
_isActive = !_isActive;
|
||||
|
||||
if (_isActive)
|
||||
{
|
||||
FlashLightOn();
|
||||
}
|
||||
else
|
||||
{
|
||||
FlashLightOff();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void ModifyCharge(float modifyValue)
|
||||
{
|
||||
CurrentCharge += modifyValue;
|
||||
CurrentCharge = Mathf.Clamp(CurrentCharge, 0, _maxCharge);
|
||||
}
|
||||
|
||||
public float GetChargeFactor()
|
||||
{
|
||||
return CurrentCharge / _maxCharge;
|
||||
}
|
||||
|
||||
private void UpdateUI()
|
||||
{
|
||||
_S_currentCharge.Value = GetChargeFactor() * 100f;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: a5afad0b2814fab4a8ac446ff9896773
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,28 @@
|
|||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
public class BatteryPickup : MonoBehaviour
|
||||
{
|
||||
[Header("Config")]
|
||||
[SerializeField] private int _pickupAmount;
|
||||
|
||||
private void OnTriggerEnter(Collider other)
|
||||
{
|
||||
print("Battery Pickup" + other);
|
||||
var flashLight = other.GetComponentInChildren<FlashLight>();
|
||||
var amountBefore = flashLight.CurrentCharge;
|
||||
if (flashLight != null)
|
||||
{
|
||||
flashLight.ModifyCharge(_pickupAmount);
|
||||
}
|
||||
|
||||
var amountAfter = flashLight.CurrentCharge;
|
||||
|
||||
if (amountBefore != amountAfter)
|
||||
{
|
||||
Destroy(gameObject.transform.parent.gameObject);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 702401cda02cf2b4eacee1c81727f1a6
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,7 @@
|
|||
fileFormatVersion: 2
|
||||
guid: a15889f63fca8264cbfbffada1b08ffa
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -111,6 +111,7 @@ Transform:
|
|||
m_ConstrainProportionsScale: 0
|
||||
m_Children:
|
||||
- {fileID: 2265701993784981172}
|
||||
- {fileID: 1625201294374954353}
|
||||
m_Father: {fileID: 8997996947095583982}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
|
@ -212,6 +213,122 @@ CapsuleCollider:
|
|||
m_Height: 2
|
||||
m_Direction: 1
|
||||
m_Center: {x: 0, y: 0, z: 0}
|
||||
--- !u!1 &6672967986838290054
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1625201294374954353}
|
||||
- component: {fileID: 7642545468050226645}
|
||||
- component: {fileID: 8694888314911841747}
|
||||
m_Layer: 0
|
||||
m_Name: FlashLight
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &1625201294374954353
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 6672967986838290054}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: -0.195, y: 0.053, z: 0.28}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 4135013735270702856}
|
||||
m_RootOrder: 1
|
||||
m_LocalEulerAnglesHint: {x: 90, y: 0, z: 0}
|
||||
--- !u!108 &7642545468050226645
|
||||
Light:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 6672967986838290054}
|
||||
m_Enabled: 1
|
||||
serializedVersion: 10
|
||||
m_Type: 0
|
||||
m_Shape: 0
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_Intensity: 1.5
|
||||
m_Range: 50
|
||||
m_SpotAngle: 48
|
||||
m_InnerSpotAngle: 21.80208
|
||||
m_CookieSize: 10
|
||||
m_Shadows:
|
||||
m_Type: 2
|
||||
m_Resolution: -1
|
||||
m_CustomResolution: -1
|
||||
m_Strength: 1
|
||||
m_Bias: 0.05
|
||||
m_NormalBias: 0.4
|
||||
m_NearPlane: 0.2
|
||||
m_CullingMatrixOverride:
|
||||
e00: 1
|
||||
e01: 0
|
||||
e02: 0
|
||||
e03: 0
|
||||
e10: 0
|
||||
e11: 1
|
||||
e12: 0
|
||||
e13: 0
|
||||
e20: 0
|
||||
e21: 0
|
||||
e22: 1
|
||||
e23: 0
|
||||
e30: 0
|
||||
e31: 0
|
||||
e32: 0
|
||||
e33: 1
|
||||
m_UseCullingMatrixOverride: 0
|
||||
m_Cookie: {fileID: 0}
|
||||
m_DrawHalo: 0
|
||||
m_Flare: {fileID: 0}
|
||||
m_RenderMode: 1
|
||||
m_CullingMask:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
m_RenderingLayerMask: 1
|
||||
m_Lightmapping: 4
|
||||
m_LightShadowCasterMode: 0
|
||||
m_AreaSize: {x: 1, y: 1}
|
||||
m_BounceIntensity: 1
|
||||
m_ColorTemperature: 6570
|
||||
m_UseColorTemperature: 0
|
||||
m_BoundingSphereOverride: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_UseBoundingSphereOverride: 0
|
||||
m_UseViewFrustumForShadowCasterCull: 1
|
||||
m_ShadowRadius: 0
|
||||
m_ShadowAngle: 0
|
||||
--- !u!114 &8694888314911841747
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 6672967986838290054}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: a5afad0b2814fab4a8ac446ff9896773, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
_powerDraw: 1
|
||||
_maxCharge: 100
|
||||
_range: 50
|
||||
_angle: 50
|
||||
_intensity: 1
|
||||
_isActive: 0
|
||||
<CurrentCharge>k__BackingField: 0
|
||||
_S_currentCharge: {fileID: 11400000, guid: 48e19716578903f48bc16fb6e1a81400, type: 2}
|
||||
_light: {fileID: 0}
|
||||
--- !u!1 &8616685848737228372
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
@ -462,6 +579,7 @@ MonoBehaviour:
|
|||
_deathHandler: {fileID: 8294200720936265358}
|
||||
_maxHealth: 100
|
||||
_health: 0
|
||||
_S_currentHealth: {fileID: 11400000, guid: 1e588c0f9b1c591469660d725c277016, type: 2}
|
||||
--- !u!1001 &1216783236557002590
|
||||
PrefabInstance:
|
||||
m_ObjectHideFlags: 0
|
||||
|
|
|
@ -5,10 +5,12 @@ public class PlayerHealth : MonoBehaviour, IDamageable
|
|||
[SerializeField] private DeathHandler _deathHandler;
|
||||
[SerializeField] private float _maxHealth;
|
||||
[SerializeField] private float _health;
|
||||
[field: SerializeField] private FloatVariable _S_currentHealth;
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
SetHealth(_maxHealth);
|
||||
UpdateUI();
|
||||
}
|
||||
|
||||
public float GetHealth()
|
||||
|
@ -31,12 +33,14 @@ public class PlayerHealth : MonoBehaviour, IDamageable
|
|||
public void ModifyHealth(float healthChange)
|
||||
{
|
||||
_health += healthChange;
|
||||
|
||||
|
||||
if (_health <= 0)
|
||||
{
|
||||
_health = 0;
|
||||
_deathHandler.HandleDeath();
|
||||
}
|
||||
|
||||
UpdateUI();
|
||||
}
|
||||
|
||||
public void SetHealth(float newHealth)
|
||||
|
@ -48,4 +52,9 @@ public class PlayerHealth : MonoBehaviour, IDamageable
|
|||
{
|
||||
_maxHealth = newHealth;
|
||||
}
|
||||
|
||||
private void UpdateUI()
|
||||
{
|
||||
_S_currentHealth.Value = GetHealthFactor() * 100;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,15 @@
|
|||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 1dc60414db7c7e84b80ebf750c4680cc, type: 3}
|
||||
m_Name: FlashlightCharge
|
||||
m_EditorClassIdentifier:
|
||||
_value: 0
|
|
@ -0,0 +1,8 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 48e19716578903f48bc16fb6e1a81400
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
File diff suppressed because one or more lines are too long
|
@ -26,17 +26,17 @@ RectTransform:
|
|||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1528385402503292479}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 1528385403718141737}
|
||||
m_Father: {fileID: 7090640494202318818}
|
||||
m_RootOrder: 1
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
m_AnchoredPosition: {x: 20, y: 60}
|
||||
m_AnchoredPosition: {x: -890, y: -430}
|
||||
m_SizeDelta: {x: 400, y: 40}
|
||||
m_Pivot: {x: 0, y: 0}
|
||||
--- !u!222 &1528385402503292476
|
||||
|
@ -591,7 +591,7 @@ RectTransform:
|
|||
- {fileID: 1528385404069288387}
|
||||
- {fileID: 1528385403207918267}
|
||||
m_Father: {fileID: 1528385403718141737}
|
||||
m_RootOrder: 4
|
||||
m_RootOrder: 2
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 1, y: 1}
|
||||
|
@ -691,11 +691,10 @@ RectTransform:
|
|||
m_ConstrainProportionsScale: 0
|
||||
m_Children:
|
||||
- {fileID: 1528385403933349391}
|
||||
- {fileID: 1528385402503292478}
|
||||
- {fileID: 1528385403870393453}
|
||||
- {fileID: 1528385404543353171}
|
||||
- {fileID: 1528385403269486996}
|
||||
- {fileID: 1528385404177470763}
|
||||
- {fileID: 7090640494202318818}
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
|
@ -791,17 +790,17 @@ RectTransform:
|
|||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1528385403870393454}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 1528385403718141737}
|
||||
m_RootOrder: 2
|
||||
m_Father: {fileID: 7090640494202318818}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
m_AnchoredPosition: {x: 20, y: 20}
|
||||
m_AnchoredPosition: {x: -890, y: -470}
|
||||
m_SizeDelta: {x: 400, y: 40}
|
||||
m_Pivot: {x: 0, y: 0}
|
||||
--- !u!222 &1528385403870393450
|
||||
|
@ -1266,7 +1265,7 @@ Transform:
|
|||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 1528385403718141737}
|
||||
m_RootOrder: 5
|
||||
m_RootOrder: 3
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!114 &1528385404177470764
|
||||
MonoBehaviour:
|
||||
|
@ -1344,7 +1343,7 @@ RectTransform:
|
|||
m_ConstrainProportionsScale: 1
|
||||
m_Children: []
|
||||
m_Father: {fileID: 1528385403718141737}
|
||||
m_RootOrder: 3
|
||||
m_RootOrder: 1
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||
|
@ -1389,3 +1388,347 @@ MonoBehaviour:
|
|||
m_FillOrigin: 0
|
||||
m_UseSpriteMesh: 0
|
||||
m_PixelsPerUnitMultiplier: 1
|
||||
--- !u!1 &4920389731988811978
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 4339051497130427763}
|
||||
- component: {fileID: 7907246831781046276}
|
||||
- component: {fileID: 6401512827633767924}
|
||||
- component: {fileID: 612408790866136015}
|
||||
m_Layer: 5
|
||||
m_Name: PlayerHealth
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &4339051497130427763
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4920389731988811978}
|
||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 7090640494202318818}
|
||||
m_RootOrder: 2
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: -890, y: 440}
|
||||
m_SizeDelta: {x: 400, y: 40}
|
||||
m_Pivot: {x: 0, y: 0}
|
||||
--- !u!222 &7907246831781046276
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4920389731988811978}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &6401512827633767924
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4920389731988811978}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 208857bb9f1bc8c48a08050795732b0a, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
_prefix: 'Health: '
|
||||
_variable: {fileID: 11400000, guid: 1e588c0f9b1c591469660d725c277016, type: 2}
|
||||
_textObject: {fileID: 612408790866136015}
|
||||
_text:
|
||||
--- !u!114 &612408790866136015
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4920389731988811978}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_RaycastTarget: 1
|
||||
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_Maskable: 1
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_text: 'Health : 99999'
|
||||
m_isRightToLeft: 0
|
||||
m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
|
||||
m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
|
||||
m_fontSharedMaterials: []
|
||||
m_fontMaterial: {fileID: 0}
|
||||
m_fontMaterials: []
|
||||
m_fontColor32:
|
||||
serializedVersion: 2
|
||||
rgba: 4294967295
|
||||
m_fontColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_enableVertexGradient: 0
|
||||
m_colorMode: 3
|
||||
m_fontColorGradient:
|
||||
topLeft: {r: 1, g: 1, b: 1, a: 1}
|
||||
topRight: {r: 1, g: 1, b: 1, a: 1}
|
||||
bottomLeft: {r: 1, g: 1, b: 1, a: 1}
|
||||
bottomRight: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_fontColorGradientPreset: {fileID: 0}
|
||||
m_spriteAsset: {fileID: 0}
|
||||
m_tintAllSprites: 0
|
||||
m_StyleSheet: {fileID: 0}
|
||||
m_TextStyleHashCode: -1183493901
|
||||
m_overrideHtmlColors: 0
|
||||
m_faceColor:
|
||||
serializedVersion: 2
|
||||
rgba: 4294967295
|
||||
m_fontSize: 36
|
||||
m_fontSizeBase: 36
|
||||
m_fontWeight: 400
|
||||
m_enableAutoSizing: 0
|
||||
m_fontSizeMin: 18
|
||||
m_fontSizeMax: 72
|
||||
m_fontStyle: 0
|
||||
m_HorizontalAlignment: 1
|
||||
m_VerticalAlignment: 512
|
||||
m_textAlignment: 65535
|
||||
m_characterSpacing: 0
|
||||
m_wordSpacing: 0
|
||||
m_lineSpacing: 0
|
||||
m_lineSpacingMax: 0
|
||||
m_paragraphSpacing: 0
|
||||
m_charWidthMaxAdj: 0
|
||||
m_enableWordWrapping: 1
|
||||
m_wordWrappingRatios: 0.4
|
||||
m_overflowMode: 0
|
||||
m_linkedTextComponent: {fileID: 0}
|
||||
parentLinkedComponent: {fileID: 0}
|
||||
m_enableKerning: 1
|
||||
m_enableExtraPadding: 0
|
||||
checkPaddingRequired: 0
|
||||
m_isRichText: 1
|
||||
m_parseCtrlCharacters: 1
|
||||
m_isOrthographic: 1
|
||||
m_isCullingEnabled: 0
|
||||
m_horizontalMapping: 0
|
||||
m_verticalMapping: 0
|
||||
m_uvLineOffset: 0
|
||||
m_geometrySortingOrder: 0
|
||||
m_IsTextObjectScaleStatic: 0
|
||||
m_VertexBufferAutoSizeReduction: 0
|
||||
m_useMaxVisibleDescender: 1
|
||||
m_pageToDisplay: 1
|
||||
m_margin: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_isUsingLegacyAnimationComponent: 0
|
||||
m_isVolumetricText: 0
|
||||
m_hasFontAssetChanged: 0
|
||||
m_baseMaterial: {fileID: 0}
|
||||
m_maskOffset: {x: 0, y: 0, z: 0, w: 0}
|
||||
--- !u!1 &5416937354821262657
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 7090640494202318818}
|
||||
m_Layer: 5
|
||||
m_Name: ScreenText
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &7090640494202318818
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 5416937354821262657}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children:
|
||||
- {fileID: 1528385403870393453}
|
||||
- {fileID: 1528385402503292478}
|
||||
- {fileID: 4339051497130427763}
|
||||
- {fileID: 1627670668491357536}
|
||||
m_Father: {fileID: 1528385403718141737}
|
||||
m_RootOrder: 4
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 100, y: 100}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!1 &9022734571370795340
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1627670668491357536}
|
||||
- component: {fileID: 2469720301436582834}
|
||||
- component: {fileID: 5632142420191003624}
|
||||
- component: {fileID: 4908148018245165700}
|
||||
m_Layer: 5
|
||||
m_Name: FlashlightCharge
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &1627670668491357536
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 9022734571370795340}
|
||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 7090640494202318818}
|
||||
m_RootOrder: 3
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: -890, y: 400}
|
||||
m_SizeDelta: {x: 400, y: 40}
|
||||
m_Pivot: {x: 0, y: 0}
|
||||
--- !u!222 &2469720301436582834
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 9022734571370795340}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &5632142420191003624
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 9022734571370795340}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 208857bb9f1bc8c48a08050795732b0a, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
_prefix: 'Flashlight: '
|
||||
_variable: {fileID: 11400000, guid: 48e19716578903f48bc16fb6e1a81400, type: 2}
|
||||
_textObject: {fileID: 4908148018245165700}
|
||||
_text:
|
||||
--- !u!114 &4908148018245165700
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 9022734571370795340}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_RaycastTarget: 1
|
||||
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_Maskable: 1
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_text: 'Flashlight: 99.9'
|
||||
m_isRightToLeft: 0
|
||||
m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
|
||||
m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
|
||||
m_fontSharedMaterials: []
|
||||
m_fontMaterial: {fileID: 0}
|
||||
m_fontMaterials: []
|
||||
m_fontColor32:
|
||||
serializedVersion: 2
|
||||
rgba: 4294967295
|
||||
m_fontColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_enableVertexGradient: 0
|
||||
m_colorMode: 3
|
||||
m_fontColorGradient:
|
||||
topLeft: {r: 1, g: 1, b: 1, a: 1}
|
||||
topRight: {r: 1, g: 1, b: 1, a: 1}
|
||||
bottomLeft: {r: 1, g: 1, b: 1, a: 1}
|
||||
bottomRight: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_fontColorGradientPreset: {fileID: 0}
|
||||
m_spriteAsset: {fileID: 0}
|
||||
m_tintAllSprites: 0
|
||||
m_StyleSheet: {fileID: 0}
|
||||
m_TextStyleHashCode: -1183493901
|
||||
m_overrideHtmlColors: 0
|
||||
m_faceColor:
|
||||
serializedVersion: 2
|
||||
rgba: 4294967295
|
||||
m_fontSize: 36
|
||||
m_fontSizeBase: 36
|
||||
m_fontWeight: 400
|
||||
m_enableAutoSizing: 0
|
||||
m_fontSizeMin: 18
|
||||
m_fontSizeMax: 72
|
||||
m_fontStyle: 0
|
||||
m_HorizontalAlignment: 1
|
||||
m_VerticalAlignment: 512
|
||||
m_textAlignment: 65535
|
||||
m_characterSpacing: 0
|
||||
m_wordSpacing: 0
|
||||
m_lineSpacing: 0
|
||||
m_lineSpacingMax: 0
|
||||
m_paragraphSpacing: 0
|
||||
m_charWidthMaxAdj: 0
|
||||
m_enableWordWrapping: 1
|
||||
m_wordWrappingRatios: 0.4
|
||||
m_overflowMode: 0
|
||||
m_linkedTextComponent: {fileID: 0}
|
||||
parentLinkedComponent: {fileID: 0}
|
||||
m_enableKerning: 1
|
||||
m_enableExtraPadding: 0
|
||||
checkPaddingRequired: 0
|
||||
m_isRichText: 1
|
||||
m_parseCtrlCharacters: 1
|
||||
m_isOrthographic: 1
|
||||
m_isCullingEnabled: 0
|
||||
m_horizontalMapping: 0
|
||||
m_verticalMapping: 0
|
||||
m_uvLineOffset: 0
|
||||
m_geometrySortingOrder: 0
|
||||
m_IsTextObjectScaleStatic: 0
|
||||
m_VertexBufferAutoSizeReduction: 0
|
||||
m_useMaxVisibleDescender: 1
|
||||
m_pageToDisplay: 1
|
||||
m_margin: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_isUsingLegacyAnimationComponent: 0
|
||||
m_isVolumetricText: 0
|
||||
m_hasFontAssetChanged: 0
|
||||
m_baseMaterial: {fileID: 0}
|
||||
m_maskOffset: {x: 0, y: 0, z: 0, w: 0}
|
||||
|
|
|
@ -73,6 +73,21 @@
|
|||
"key": "UVEditor.showPreviewMaterial",
|
||||
"value": "{\"m_Value\":true}"
|
||||
},
|
||||
{
|
||||
"type": "System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089",
|
||||
"key": "editor.stripProBuilderScriptsOnBuild",
|
||||
"value": "{\"m_Value\":true}"
|
||||
},
|
||||
{
|
||||
"type": "System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089",
|
||||
"key": "ShapeComponent.ResetSettings",
|
||||
"value": "{\"m_Value\":false}"
|
||||
},
|
||||
{
|
||||
"type": "System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089",
|
||||
"key": "ShapeComponent.SettingsEnabled",
|
||||
"value": "{\"m_Value\":true}"
|
||||
},
|
||||
{
|
||||
"type": "UnityEngine.ProBuilder.LogLevel, Unity.ProBuilder, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null",
|
||||
"key": "log.level",
|
||||
|
@ -121,7 +136,7 @@
|
|||
{
|
||||
"type": "UnityEngine.ProBuilder.SelectMode, Unity.ProBuilder, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null",
|
||||
"key": "editor.lastMeshSelectMode",
|
||||
"value": "{\"m_Value\":2}"
|
||||
"value": "{\"m_Value\":8}"
|
||||
},
|
||||
{
|
||||
"type": "UnityEngine.Rendering.ShadowCastingMode, UnityEngine.CoreModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null",
|
||||
|
@ -158,10 +173,45 @@
|
|||
"key": "SubdivideEdges.subdivisions",
|
||||
"value": "{\"m_Value\":1}"
|
||||
},
|
||||
{
|
||||
"type": "System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089",
|
||||
"key": "ShapeBuilder.ActiveShapeIndex",
|
||||
"value": "{\"m_Value\":3}"
|
||||
},
|
||||
{
|
||||
"type": "System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089",
|
||||
"key": "ShapeBuilder.LastPivotLocation",
|
||||
"value": "{\"m_Value\":0}"
|
||||
},
|
||||
{
|
||||
"type": "System.Single, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089",
|
||||
"key": "uv.uvEditorGridSnapIncrement",
|
||||
"value": "{\"m_Value\":0.125}"
|
||||
},
|
||||
{
|
||||
"type": "UnityEngine.ProBuilder.PivotLocation, Unity.ProBuilder, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null",
|
||||
"key": "mesh.newShapePivotLocation",
|
||||
"value": "{\"m_Value\":1}"
|
||||
},
|
||||
{
|
||||
"type": "UnityEngine.Vector3, UnityEngine.CoreModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null",
|
||||
"key": "ShapeBuilder.LastPivotPosition",
|
||||
"value": "{\"m_Value\":{\"x\":0.0,\"y\":0.0,\"z\":0.0}}"
|
||||
},
|
||||
{
|
||||
"type": "UnityEngine.Vector3, UnityEngine.CoreModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null",
|
||||
"key": "ShapeBuilder.LastSize",
|
||||
"value": "{\"m_Value\":{\"x\":0.10000000149011612,\"y\":0.30000001192092898,\"z\":0.10000000149011612}}"
|
||||
},
|
||||
{
|
||||
"type": "UnityEngine.Quaternion, UnityEngine.CoreModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null",
|
||||
"key": "ShapeBuilder.LastRotation",
|
||||
"value": "{\"m_Value\":{\"x\":0.0,\"y\":0.0,\"z\":0.0,\"w\":1.0}}"
|
||||
},
|
||||
{
|
||||
"type": "UnityEngine.ProBuilder.Shapes.Shape, Unity.ProBuilder, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null",
|
||||
"key": "ShapeBuilder.Cylinder",
|
||||
"value": "{}"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue