add movement, wall, slope - prototype
This commit is contained in:
parent
4fb73b0609
commit
fec6eaffa0
3
Assets/# Prototype/Scripts.meta
Normal file
3
Assets/# Prototype/Scripts.meta
Normal file
@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 8119b8473df143cbb69a18ae2aa430c4
|
||||
timeCreated: 1779787550
|
||||
34
Assets/# Prototype/Scripts/MeshColorSetter.cs
Normal file
34
Assets/# Prototype/Scripts/MeshColorSetter.cs
Normal file
@ -0,0 +1,34 @@
|
||||
using Intrepid.Utilities;
|
||||
using Sirenix.OdinInspector;
|
||||
using UnityEngine;
|
||||
|
||||
namespace __Prototype.Scripts
|
||||
{
|
||||
public sealed class MeshColorSetter : MonoBehaviour
|
||||
{
|
||||
[GroupInjections, SerializeField] private Renderer meshRenderer;
|
||||
[GroupConfigurations, SerializeField] private Color color = Color.orange;
|
||||
|
||||
private static readonly int BaseColor = Shader.PropertyToID("_BaseColor");
|
||||
|
||||
private MaterialPropertyBlock block;
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
block = new MaterialPropertyBlock();
|
||||
}
|
||||
|
||||
private void Start()
|
||||
{
|
||||
Paint();
|
||||
}
|
||||
|
||||
[GroupDebug, Button(ButtonSizes.Medium)]
|
||||
private void Paint()
|
||||
{
|
||||
meshRenderer.GetPropertyBlock(block);
|
||||
block.SetColor(BaseColor, color);
|
||||
meshRenderer.SetPropertyBlock(block);
|
||||
}
|
||||
}
|
||||
}
|
||||
3
Assets/# Prototype/Scripts/MeshColorSetter.cs.meta
Normal file
3
Assets/# Prototype/Scripts/MeshColorSetter.cs.meta
Normal file
@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 0a0ba32e2ebe4f2eb4f2e18c11be758d
|
||||
timeCreated: 1779787557
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user