HeavenStudioPlus/Assets/Scripts/Games/Fillbots/FullBody.cs
フマジメ 4672297af8 Fillbots (#824)
* basic set up

* game prefab set up

* fillboy

* Medium bot falls down from da skyyyyyy

* animations! (fillbots)

* filler whiffs

* Medium bot anims

* Bots can be filled wow

* Bots move!!!!!

* Fixed hold length

* offbeats now work

* kaboom

* barelies for medium bot

* basic fix

* beyond

* Update Sprites

* Small Medium Large

* Bot Lamp

* blackout

* yet not implemented

* Filler Animation

* Fly Animation

* Stack to Left

* Update Sprites

* Color event

* refactoring

* minor fixes

* temporary icon

* Restart the stopped conveyor

---------

Co-authored-by: Rapandrasmus <78219215+Rapandrasmus@users.noreply.github.com>
2024-04-05 01:28:09 +00:00

34 lines
936 B
C#

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
namespace HeavenStudio.Games.Scripts_Fillbots
{
public class FullBody : MonoBehaviour
{
[SerializeField] private SpriteMask mask;
[SerializeField] private Sprite[] sprites;
[SerializeField] private SpriteRenderer fullBody;
[System.NonSerialized] public Color lampColorOff = new Color(0.635f, 0.635f, 0.185f);
[System.NonSerialized] public Color lampColorOn = new Color(1f, 1f, 0.42f);
public enum LampState
{
Off,
On,
}
public void SetMask(int i)
{
mask.sprite = sprites[i];
}
public void SetLamp(LampState state)
{
if (state == LampState.On) fullBody.material.SetColor("_ColorAlpha", lampColorOn);
else fullBody.material.SetColor("_ColorAlpha", lampColorOff);
}
}
}