Exemple #1
0
        static public float GetTime(this TimeType item)
        {
            switch (item)
            {
            case TimeType.Active: return(ActiveGameTime.GetTime());

            case TimeType.Actual: return(ActualGameTime.GetTime());
            }

            throw new UnaccountedBranchException("item", item);
        }
Exemple #2
0
        private void Update()
        {
            if (Application.isPlaying)
            {
                SpriteSequenceFrame frame = current_sequence.GetFrameByValue(sequence_value);

                if (frame.IsSloped())
                {
                    sequence_value += frame.GetSlope() * ActiveGameTime.GetDelta();
                }

                GetComponent <SpriteRenderer>().sprite = frame.GetSprite();
            }
            else
            {
                GetComponent <SpriteRenderer>().sprite = sequenced_sprite.GetDefaultSprite();
            }
        }