using System.Collections; using System.Collections.Generic; using UnityEngine; using HeavenStudio.Util; namespace HeavenStudio.Games.Scripts_FlockStep { public class Huebird : MonoBehaviour { public Color mainBody; [SerializeField] Animator huebirdAnimator; [SerializeField] SpriteRenderer hueBody; [SerializeField] SpriteRenderer hueWing; [System.NonSerialized] public float stepTime; private FlockStep game; void Awake() { game = FlockStep.instance; Material huebirdMaterial; huebirdMaterial = hueBody.material; huebirdMaterial.SetColor("_ColorAlpha", mainBody); huebirdMaterial = hueWing.material; huebirdMaterial.SetColor("_ColorAlpha", mainBody); } public void PlayAnim(string animName, float timescale = 0.5f, float startpos = 0f, int layer = -1) { huebirdAnimator.DoScaledAnimationAsync(animName, timescale, startpos, layer); } } }