コード例 #1
0
    /// <summary>
    /// Perform an animation of the given type and index. No animation will be played if the animation
    /// is not present. The index given is the index of the animation in the array specified on the 
    /// prefab, not the index of the animation out of all the animations
    /// </summary>
    /// <param name="type">The type of animation to play</param>
    /// <param name="index">The index of the animation</param>
    public void Attack(AnimationType type, int index)
    {
        AnimationClip[] animations;

        switch (type)
        {
            case AnimationType.Spell:
                animations = _spellAnimations;
                break;

            case AnimationType.Misc:
                animations = _miscAnimations;
                break;

            default:
                animations = _meleeAnimations;
                break;
        }

        try
        {
            animation.Play(animations[index].name);
        }

        catch
        {
            Debug.LogWarning("There is no " + type + " animation " + "indexed at " + index + ".");
        }
    }
コード例 #2
0
        public Animation CreateAnimation(AnimationType animationName, IndexPair startLocation)
        {
            switch (animationName)
            {
                case AnimationType.PlayerAnimation:
                    temp = new PlayerAnimation();
                    break;

                case AnimationType.MonsterAnimation:
                    temp = new MonsterAnimation(); // new MonsterAnimation();
                    temp.AddCollider();
                    //((MonsterAnimation)temp).Collider = new Collider(((MonsterAnimation)temp));
                    break;
                // The animation point will be set when its requested from the pool
                case AnimationType.BulletAnimation:
                    temp = new BulletAnimation();
                    temp.AddCollider();
                    //((BulletAnimation)temp).Collider = new Collider(((BulletAnimation)temp));
                    break;
                // The animation point will be set when its requested from the pool
                case AnimationType.ExplosionAnimation:
                    temp = new ExplosionAnimation();
                    break;

                default:
                    return null;
            }
            return temp;
        }
コード例 #3
0
        public static Animation CreateEmpyAnimation(AnimationType animationName)
        {
            IndexPair startLocation = new IndexPair(0, 0);
            switch (animationName)
            {
                case AnimationType.PlayerAnimation:
                    temp = new PlayerAnimation();
                    temp.AddCollider();
                    break;

                case AnimationType.MonsterAnimation:
                    temp = new MonsterAnimation(); // new MonsterAnimation();
                    temp.AddCollider();
                    //((MonsterAnimation)temp).Collider = new Collider(((MonsterAnimation)temp));
                    break;
                // The animation point will be set when its requested from the pool
                case AnimationType.BulletAnimation:

                    temp = new BulletAnimation();
                    temp.AddCollider();
                    //((BulletAnimation)temp).Collider = new Collider(((BulletAnimation)temp));
                    break;
                // The animation point will be set when its requested from the pool
                case AnimationType.ExplosionAnimation:
                    temp = new ExplosionAnimation();
                    temp.Collider = new Collider(temp, System.Drawing.Rectangle.Empty);
                    break;

                default:
                    return null;
            }
            return temp;
        }
コード例 #4
0
 public static AnimationTimeline Create(AnimationType type, object oldValue, object newValue, TimeSpan duration, TimeSpan beginTime, double acceleration, double deceleration)
 {
     switch (type)
     {
         case AnimationType.DoubleAnimation:
             if (oldValue != null)
                 return new DoubleAnimation((double)oldValue, (double)newValue, duration) { BeginTime = beginTime, AccelerationRatio = acceleration, DecelerationRatio = deceleration };
             else
                 return new DoubleAnimation((double)newValue, duration) { BeginTime = beginTime, AccelerationRatio = acceleration, DecelerationRatio = deceleration };
         case AnimationType.ColorAnimation:
             if (newValue is Color)
             {
                 if (oldValue != null)
                     return new ColorAnimation((Color)oldValue, (Color)newValue, duration) { BeginTime = beginTime, AccelerationRatio = acceleration, DecelerationRatio = deceleration };
                 else
                     return new ColorAnimation((Color)newValue, duration) { BeginTime = beginTime, AccelerationRatio = acceleration, DecelerationRatio = deceleration };
             }
             else
             {
                 if (oldValue != null)
                     return new ColorAnimation((Color)oldValue, (Color)ColorConverter.ConvertFromString(newValue as string), duration) { BeginTime = beginTime, AccelerationRatio = acceleration, DecelerationRatio = deceleration };
                 else
                     return new ColorAnimation((Color)ColorConverter.ConvertFromString(newValue as string), duration) { BeginTime = beginTime, AccelerationRatio = acceleration, DecelerationRatio = deceleration };
             }
         case AnimationType.ThicknessAnimation:
             if (oldValue != null)
                 return new ThicknessAnimation((Thickness)oldValue, (Thickness)newValue, duration) { BeginTime = beginTime, AccelerationRatio = acceleration, DecelerationRatio = deceleration };
             else
                 return new ThicknessAnimation((Thickness)newValue, duration) { BeginTime = beginTime, AccelerationRatio = acceleration, DecelerationRatio = deceleration };
         default:
             return null;
     }
 }
コード例 #5
0
    public void Create(string name, AnimationType animationType, int frames, int rows, int columns, Vector2 firstFrameStart, float tilingX, float tilingY)
    {
        _name = name;
        _animationType = animationType;
        _frames = frames;
        _rows = rows;
        _columns = columns;
        _firstFrameStart = firstFrameStart;
        _tilingX = tilingX;
        _tilingY = tilingY;

        _currentFrame = 2;
        int frameCounter = 0;

        _spriteInfo = new Hashtable();

        for (int row = 0; row < rows; row++)
        {
            for (int column = 0; column < columns; column++)
            {
                frameCounter++;

                Vector2 frameCoords = new Vector2();

                frameCoords.x = firstFrameStart.x + ( tilingX * (float)column );
                frameCoords.y = firstFrameStart.y + (  tilingY * (float)row );

                _spriteInfo.Add(frameCounter, frameCoords);
            }
        }
    }
コード例 #6
0
 public SpellObject(
     uint ID, 
     uint Count,            
     uint OverlayFileRID,
     uint NameRID, 
     uint Flags,
     ushort LightFlags, 
     byte LightIntensity, 
     ushort LightColor, 
     AnimationType FirstAnimationType, 
     byte ColorTranslation, 
     byte Effect, 
     Animation Animation, 
     BaseList<SubOverlay> SubOverlays,                      
     byte TargetsCount,
     SchoolType SchoolType)
     : base(ID, Count, 
         OverlayFileRID, NameRID, Flags, 
         LightFlags, LightIntensity, LightColor, 
         FirstAnimationType, ColorTranslation, Effect, 
         Animation, SubOverlays)
 {
     this.targetsCount = TargetsCount;
     this.schoolType = SchoolType;
 }
コード例 #7
0
ファイル: iTweenAnimation.cs プロジェクト: thuskey/ARCard
 public void StartAnimation(AnimationType animType)
 {
     switch (animType) {
             case AnimationType.rotate:
                     StartRotate ();
                     break;
             case AnimationType.rotateY:
                     StartRotateY ();
                     break;
             case AnimationType.move:
                     StartMoveAdd ();
                     break;
             case AnimationType.punchscale:
                     StartPunchScale (new Vector3 (1, 1, 1));
                     break;
             case AnimationType.linerotate:
                     StartRotateLine ();
                     break;
             case AnimationType.linerotateY:
                     StartRotateLineY ();
                     break;
             case AnimationType.movefrom:
                     StartMoveFrom ();
                     break;
             default:
                     return;
                     break;
             }
 }
コード例 #8
0
ファイル: Sushi.cs プロジェクト: fotoco/006772
 //애니메이션을 재생합니다.
 public void PlayAnimation(AnimationType anim) {
     m_current = anim;
     
     //초밥 종류에 따라서 애니메이션을 지정합니다.
     string animName = m_sushiType.ToString() + "_" + m_current.ToString();
     m_animation.Play(animName);
 }
コード例 #9
0
ファイル: AnimatedBasePage.cs プロジェクト: torifat/C0nv3rt3r
        public AnimatorHelperBase GetContinuumAnimation(FrameworkElement element, AnimationType animationType)
        {
            TextBlock nameText;

            if (element is TextBlock)
                nameText = element as TextBlock;
            else
                nameText = element.GetVisualDescendants().OfType<TextBlock>().FirstOrDefault();

            if (nameText != null)
            {
                if (animationType == AnimationType.NavigateForwardIn)
                {
                    return new ContinuumForwardInAnimator() { RootElement = nameText, LayoutRoot = AnimationContext };
                }
                if (animationType == AnimationType.NavigateForwardOut)
                {
                    return new ContinuumForwardOutAnimator() { RootElement = nameText, LayoutRoot = AnimationContext };
                }
                if (animationType == AnimationType.NavigateBackwardIn)
                {
                    return new ContinuumBackwardInAnimator() { RootElement = nameText, LayoutRoot = AnimationContext };
                }
                if (animationType == AnimationType.NavigateBackwardOut)
                {
                    return new ContinuumBackwardOutAnimator() { RootElement = nameText, LayoutRoot = AnimationContext };
                }
            }
            return null;
        }
コード例 #10
0
        /// <summary>
        /// Loads an animated graphics. The descriptor file for the animation must be
        /// in the "animations" folder.
        /// </summary>
        /// <param name="animationName">The name of the animation.</param>
        /// <param name="game"></param>
        public AnimatedGraphics(string animationName, Game game)
        {
            PropertyReader props = game.loader.GetPropertyReader().Select("animations/" + animationName + ".xml");
            foreach (PropertyReader group in props.SelectAll("group")) {
                Animation current = new Animation();
                string[] animName = group.GetString("name").Split('.');
                string type = animName[0];
                Sprite.Dir dir = (Sprite.Dir)Enum.Parse(typeof(Sprite.Dir), animName[1], true);
                AnimationType animType = new AnimationType(type, dir);
                List<Frame> frames = new List<Frame>();
                foreach (PropertyReader frameProp in group.SelectAll("frame")) {
                    Frame frame = new Frame();
                    frame.id = frameProp.GetInt("sheetid");
                    frame.time = frameProp.GetInt("time");
                    frames.Add(frame);
                }
                current.frames = frames.ToArray();
                animations.Add(animType, current);
                if (this.currentAnimation == null) {
                    this.currentAnimation = current;
                    this.currentType = animType;
                }
            }
            LoadSpriteSheet(props.GetString("sheet"), game);

            if (currentAnimation == null) {
                throw new Game.SettingsException(string.Format("Animation descriptor file \"{0}.xml\" does not contain animation!", animationName));
            }
            this.frame = 0;
            CalculateRows();
        }
コード例 #11
0
ファイル: Animation.cs プロジェクト: HaKDMoDz/Psy
 public Animation(EpicModel epicModel, AnimationType animationType)
 {
     _epicModel = epicModel;
     AnimationType = animationType;
     _keyframes = new List<Keyframe>(10);
     _ignoredModelParts = new List<ModelPart>();
 }
コード例 #12
0
		/// <summary>
		/// GameObjectを作成する
		/// </summary>
		/// <param name='format'>内部形式データ</param>
		/// <param name='use_rigidbody'>剛体を使用するか</param>
		/// <param name='animation_type'>アニメーションタイプ</param>
		/// <param name='use_ik'>IKを使用するか</param>
		/// <param name='scale'>スケール</param>
		public static GameObject CreateGameObject(PMXFormat format, bool use_rigidbody, AnimationType animation_type, bool use_ik, float scale) {
			GameObject result;
			using (PMXConverter converter = new PMXConverter()) {
				result = converter.CreateGameObject_(format, use_rigidbody, animation_type, use_ik, scale);
			}
			return result;
		}
コード例 #13
0
ファイル: EasingFunctions.cs プロジェクト: DevHalo/CStrike2D
        /// <summary>
        /// Returns the appropriate function given the
        /// requested animation type
        /// </summary>
        /// <param name="time"></param>
        /// <param name="startingPoint"></param>
        /// <param name="change"></param>
        /// <param name="animationTime"></param>
        /// <param name="animType"></param>
        /// <returns></returns>
        public static double Animate(double time, double startingPoint, double change, double animationTime, AnimationType animType)
        {
            // If the animation is complete
            // Return the destination to avoid overshoot
            if (time > animationTime)
            {
                return startingPoint + change;
            }

            switch (animType)
            {
                case AnimationType.Linear:
                    return Linear(time, startingPoint, change, animationTime);
                case AnimationType.QuadraticIn:
                    return QuadraticIn(time, startingPoint, change, animationTime);
                case AnimationType.QuadraticOut:
                    return QuadraticOut(time, startingPoint, change, animationTime);
                case AnimationType.QuadraticInOut:
                    return QuadraticInOut(time, startingPoint, change, animationTime);
                case AnimationType.CubicIn:
                    return CubicIn(time, startingPoint, change, animationTime);
                case AnimationType.CubicOut:
                    return CubicOut(time, startingPoint, change, animationTime);
                case AnimationType.CubicInOut:
                    return CubicInOut(time, startingPoint, change, animationTime);
                case AnimationType.QuarticIn:
                    return QuarticIn(time, startingPoint, change, animationTime);
                case AnimationType.QuarticOut:
                    return QuarticOut(time, startingPoint, change, animationTime);
                case AnimationType.QuarticInOut:
                    return QuarticInOut(time, startingPoint, change, animationTime);
                case AnimationType.QuinticIn:
                    return QuinticIn(time, startingPoint, change, animationTime);
                case AnimationType.QuinticOut:
                    return QuinticOut(time, startingPoint, change, animationTime);
                case AnimationType.QuinticInOut:
                    return QuinticInOut(time, startingPoint, change, animationTime);
                case AnimationType.SinIn:
                    return SinIn(time, startingPoint, change, animationTime);
                case AnimationType.SinOut:
                    return SinOut(time, startingPoint, change, animationTime);
                case AnimationType.SinInOut:
                    return SinInOut(time, startingPoint, change, animationTime);
                case AnimationType.ExpIn:
                    return ExpIn(time, startingPoint, change, animationTime);
                case AnimationType.ExpOut:
                    return ExpOut(time, startingPoint, change, animationTime);
                case AnimationType.ExpInOut:
                    return ExpInOut(time, startingPoint, change, animationTime);
                case AnimationType.CircIn:
                    return CircIn(time, startingPoint, change, animationTime);
                case AnimationType.CircOut:
                    return CircOut(time, startingPoint, change, animationTime);
                case AnimationType.CircInOut:
                    return CircInOut(time, startingPoint, change, animationTime);
                default:
                    throw new Exception("An Invalid Enum was given");
            }
        }
コード例 #14
0
ファイル: GameScreen.cs プロジェクト: warrussell/ggj2016
	public virtual void Setup(AnimationType animType)
	{
		_rectTransform = GetComponent<RectTransform>();
		_canvas = GetComponent<Canvas>();
		
		_animationType = animType;
		gameObject.SetActive(false);
	}
コード例 #15
0
ファイル: Settings.cs プロジェクト: Sibcat/Slideshow
		public Settings (bool automaticChange, bool onlyFavorites, bool randomOrder, double changeInterval, AnimationType animationType)
		{
			AutomaticChange = automaticChange;
			OnlyFavorites = onlyFavorites;
			RandomOrder = randomOrder;
			ChangeInterval = changeInterval;
			AnimationType = animationType;			
		}
コード例 #16
0
ファイル: Sushi.cs プロジェクト: fotoco/006772
    // Use this for initialization
    void Start() {
        m_animation = GetComponent<Animation>();
        m_current = AnimationType.sleep;

        if (m_animation.isPlaying == false) {
            PlayAnimation(AnimationType.sleep);
        }
    }
コード例 #17
0
ファイル: AnimationComponent.cs プロジェクト: klutch/Loderpit
 public AnimationComponent(int entityId, AnimationCategory animationCategory, AnimationType animationType, int ticksPerFrame)
 {
     _entityId = entityId;
     _animationCategory = animationCategory;
     _animationType = animationType;
     _ticksPerFrame = ticksPerFrame;
     _ticksSinceFrameChange = _ticksPerFrame;
     _shape = new RectangleShape();
 }
コード例 #18
0
ファイル: Animation.cs プロジェクト: refuzed/Platfarm
 public Animation(GameEntity gameEntity, AnimationType animationType, int frameCount, float frameTime, bool loop)
 {
     _gameEntity = gameEntity;
     _texture = gameEntity.Texture;
     _animationType = animationType;
     _frameCount = frameCount;
     _frameTime = frameTime;
     _loop = loop;
 }
コード例 #19
0
ファイル: Animation.cs プロジェクト: Nakato53/Jam
 public Animation(Texture2D texture, int frameTime, int frameWidth, AnimationType animationType  )
 {
     this._animationType = animationType;
     this.Texture = texture;
     this._frameTime = frameTime;
     this._frameWidth = frameWidth;
     this._totalFrame = this.Texture.Width / this._frameWidth;
     this.Reset();
 }
コード例 #20
0
ファイル: MobileAnimation.cs プロジェクト: greeduomacro/SpyUO
        protected override void Parse( BigEndianReader reader )
        {
            reader.ReadByte(); // ID

            _Serial = reader.ReadUInt32();
            _AnimationType = (AnimationType) reader.ReadInt16();
            _Action = reader.ReadInt16();
            _Delay = reader.ReadByte();
        }
コード例 #21
0
ファイル: Marker.cs プロジェクト: TylerEspo/AnimationV
 public Marker(MarkerType markertype, Vector3 position, Color color, AnimationType type)
 {
     this.markertype = markertype;
     this.position = position;
     this.color = color;
     this.type = type;
     this.scale = Default_Scale;
     _time = 0;
 }
コード例 #22
0
ファイル: Model.cs プロジェクト: ZelimDamian/OpenTK-for-VTK-
 public bool IsAnimatedWith(AnimationType type)
 {
     foreach(Animation anim in Animations)
     {
         if(anim.Type == type)
             return true;
     }
     return false;
 }
コード例 #23
0
ファイル: AnimatedTitle.cs プロジェクト: ndrarmstrong/blog
 public AnimatedTitle(AnimationType animationType, string title, params string[] names)
 {
     _animationType = animationType;
     Title = title;
     foreach (string name in names)
     {
         NamesCollection.Add(name);
     }
 }
コード例 #24
0
	public void Play(AnimationType animationType)
	{
		if(animationType != _currentAnimation)
		{
			_currentAnimation = animationType;
			_animator.SetInteger(_parameter, (int)_currentAnimation);

			SetSpeed(1);
		}
	}
コード例 #25
0
ファイル: Animation.cs プロジェクト: hkeeble/HKFramework
 /// <summary>
 /// Constructs a new animation.
 /// </summary>
 /// <param name="spriteSheet">The sprite sheet for the animation to use.</param>
 /// <param name="position">The screen position of the animation.</param>
 /// <param name="scale">The scale of the animation.</param>
 /// <param name="millisecondsBetweenFrame">The milliseconds between each frame in the animation.</param>
 /// <param name="frameWidth">The width of each animation frame.</param>
 /// <param name="frameHeight">The height of each animation frame.</param>
 /// <param name="animationType">The type of animation.</param>
 public Animation(Texture2D spriteSheet, Vector2 position, Vector2 scale, int millisecondsBetweenFrame, int frameWidth, int frameHeight, AnimationType animationType)
     : base(spriteSheet, position, scale)
 {
     _millisecondsBetweenFrame = millisecondsBetweenFrame;
     _frameWidth = frameWidth;
     _frameHeight = frameHeight;
     _sheetFrameWidth = _texture.Width / frameWidth;
     _sheetFrameHeight = _texture.Height / frameHeight;
     _animType = animationType;
 }
コード例 #26
0
ファイル: ViNoToolbar.cs プロジェクト: Joon-min/wiper
 public static AnimationNode GetAnimationNodeTempl(  AnimationType tp , float duration  )
 {
     string path =  ViNoToolUtil.GetAssetDataPath() + "Templates/AnimationNode.prefab";
     GameObject animObj = AssetDatabase.LoadAssetAtPath( path , typeof( GameObject) ) as GameObject;
     AnimationNode animNode = animObj.GetComponent<AnimationNode>();
     animNode.animationType = tp;
     animNode.animTarget = Selection.activeGameObject;
     animNode.duration = duration;
     return animNode;
 }
コード例 #27
0
ファイル: Animation.cs プロジェクト: Bannersean/osu-sgl
 /// <summary>
 /// Cunstructor for normal storyboard commands
 /// </summary>
 /// <param name="easing"></param>
 /// <param name="startTime"></param>
 /// <param name="endTime"></param>
 /// <param name="startParams"></param>
 /// <param name="endParams"></param>
 public Animation(AnimationType animationType, int easing, int startTime, int endTime, double[] startParams,
                  double[] endParams)
     : base(startTime)
 {
     this.animationType = animationType;
     this.easing = easing;
     this.endTime = endTime;
     this.startParams = startParams;
     this.endParams = endParams;
 }
コード例 #28
0
ファイル: Animation.cs プロジェクト: DuckKnightDuel/Adam
 public Animation(Texture2D texture, Rectangle drawRectangle, int switchFrame, int restart, AnimationType type)
 {
     this._type = type;
     SourceRectangle = new Rectangle(0, 0, drawRectangle.Width, drawRectangle.Height);
     this.Texture = texture;
     this.DrawRectangle = drawRectangle;
     this.SwitchFrame = switchFrame;
     this.Restart = restart;
     _frameCount = new Vector2(texture.Width / drawRectangle.Width, texture.Height / drawRectangle.Height);
 }
コード例 #29
0
        // Called by the consumer when they want to animate the LED
        public void Animate(double red, double green, double blue, double intensity, TimeSpan animationTime, AnimationType type = AnimationType.Linear)
        {
            // Bounds check
            if((red < 0 || red > 1.0) && red != AnimatedLed.INGORE_VALUE)
            {
                throw new ArgumentOutOfRangeException("Red must be between 0 and 1 except for -1!");
            }
            if ((green < 0 || green > 1.0) && green != AnimatedLed.INGORE_VALUE)
            {
                throw new ArgumentOutOfRangeException("Green must be between 0 and 1 except for -1!");
            }
            if ((blue < 0 || blue > 1.0) && blue != AnimatedLed.INGORE_VALUE)
            {
                throw new ArgumentOutOfRangeException("Blue must be between 0 and 1 except for -1!");
            }
            if ((intensity < 0 || intensity > 1.0) && intensity != AnimatedLed.INGORE_VALUE)
            {
                throw new ArgumentOutOfRangeException("Intensity must be between 0 and 1 except for -1!");
            }
            if(animationTime.TotalMilliseconds < 0)
            {
                throw new ArgumentOutOfRangeException("The animation time must be positive!");
            }

            // Update the values that need updating
            if(red != AnimatedLed.INGORE_VALUE)
            {
                m_desiredRed = red;
                m_startRed = m_led.Red;
                m_animationLengthRed = (uint)animationTime.TotalMilliseconds;
                m_animationRemainRed = (int)animationTime.TotalMilliseconds;
            }
            if(green != AnimatedLed.INGORE_VALUE)
            {
                m_desiredGreen = green;
                m_startGreen = m_led.Green;
                m_animationLengthGreen = (uint)animationTime.TotalMilliseconds;
                m_animationRemainGreen = (int)animationTime.TotalMilliseconds;
            }
            if (blue != AnimatedLed.INGORE_VALUE)
            {
                m_desiredBlue = blue;
                m_startBlue = m_led.Blue;
                m_animationLengthBlue = (uint)animationTime.TotalMilliseconds;
                m_animationRemainBlue = (int)animationTime.TotalMilliseconds;
            }
            if (intensity != AnimatedLed.INGORE_VALUE)
            {
                m_desiredIntensity = intensity;
                m_startIntensity = m_led.Intensity;
                m_animationLengthIntensity = (uint)animationTime.TotalMilliseconds;
                m_animationRemainIntensity = (int)animationTime.TotalMilliseconds;
            }
        }
コード例 #30
0
 protected AbstractActionAbility(String name, int actionCost, AbilityType abilityType, TargetTypes targetTypes,
     DefaultTargetType defaultTarget, AnimationType animType , AbstractDamageBehaviour damageBehaviour)
     : base(name, actionCost, abilityType)
 {
     this.TargetType = targetTypes;
     this.DefaultTarget = defaultTarget;
     abilityType |= AbilityType.Action;
     //this.AnimationBehaviour = animBehaviour;
     this.DamageBehaviour = damageBehaviour;
     this.AnimationType = animType;
 }
コード例 #31
0
 /// <summary> Initializes a new instance of the <see cref="Move" /> class </summary>
 /// <param name="animationType"> The animation type that determines the behavior of this animation </param>
 public Move(AnimationType animationType)
 {
     Reset(animationType);
 }
コード例 #32
0
 public AnimatedSprite(float x, float y, string sprite, AnimationType animationType, int totalFrames, int columns, float frameDuration) : this(x, y, sprite, animationType, totalFrames, columns, frameDuration, true)
 {
 }
コード例 #33
0
        public static void AnimationFlip(this UIView view,
                                         AnimationType type, FlipType flip,
                                         double duration            = 0.3,
                                         Action <bool> onCompletion = null)
        {
            var m34 = (nfloat)(-1 * 0.001);

            view.Alpha = 1.0f;

            var minTransform = CATransform3D.Identity;

            minTransform.m34 = m34;


            var maxTransform = CATransform3D.Identity;

            maxTransform.m34 = m34;

            nfloat x = flip == FlipType.Horizontal ? 1.0f : 0f;
            nfloat y = flip == FlipType.Vertical ? 1.0f : 0f;

            switch (type)
            {
            case AnimationType.In:
                minTransform = minTransform.Rotate((float)(1 * Math.PI * 0.5),
                                                   x, y, 0.0f);
                view.Alpha           = MinAlpha;
                view.Layer.Transform = minTransform;
                break;

            case AnimationType.Out:
                minTransform = minTransform.Rotate((float)(-1 * Math.PI * 0.5),
                                                   x, y, 0.0f);
                view.Alpha           = MaxAlpha;
                view.Layer.Transform = maxTransform;
                break;

            default:
                throw new ArgumentOutOfRangeException(nameof(type), type, null);
            }

            AnimateNotifyInternal(duration, () =>
            {
                view.Layer.AnchorPoint = new CGPoint(0.5f, 0.5f);

                switch (type)
                {
                case AnimationType.In:
                    view.Alpha           = MaxAlpha;
                    view.Layer.Transform = maxTransform;
                    break;

                case AnimationType.Out:
                    view.Alpha           = MinAlpha;
                    view.Layer.Transform = minTransform;
                    break;

                default:
                    throw new ArgumentOutOfRangeException(nameof(type), type, null);
                }
            }, onCompletion);
        }
コード例 #34
0
 public ColorAnimation(Color colorFrom, Color colorTo, Time animationPeriod, AnimationType type, InterpolationMethod method) :
     base(0, 1, animationPeriod, type, method)
 {
     this.colorFrom = colorFrom;
     this.colorTo   = colorTo;
 }
コード例 #35
0
 protected override void AnimationsComplete(AnimationType animationType)
 {
     CreditList.SelectedIndex = -1;
     base.AnimationsComplete(animationType);
 }
コード例 #36
0
 public virtual void Draw(TimeSpan dt)
 {
     if (_deathTimerSet)
     {
         if (Extensions.GetMS() - _deathCallTime > _deathTime)
         {
             Enabled = false;
         }
     }
     if (IsAnimated && Timing.DrawTiming.Elapsed - _lastUpdate > TimeSpan.FromMilliseconds(Animation.FrameRate))
     {
         Texture                 = Animation.Frames[Animation.CurrentFrame];
         _lastUpdate             = Timing.DrawTiming.Elapsed;
         Animation.CurrentFrame += 1;
         Animation.CurrentFrame %= Animation.Frames.Count;
         if (AnimationType == AnimationType.CutIn && Animation.CurrentFrame == 0 && _stashedAnimation != null)
         {
             Animation         = _stashedAnimation;
             _stashedAnimation = null;
             AnimationFinished = true;
         }
         if (AnimationType == AnimationType.Single && Animation.CurrentFrame == 0)
         {
             Texture           = _stashedFrame;
             IsAnimated        = false;
             AnimationType     = AnimationType.None;
             AnimationFinished = true;
         }
     }
     if (Texture != null)
     {
         int cax = 0;
         int cay = 0;
         if (FollowCamera)
         {
             cax = Program.Game.Camera.X;
             cay = Program.Game.Camera.Y;
         }
         if (UseBlur && Program.Blur)
         {
             double dix         = Position.X - Program.BlurOrigin.X;
             double diy         = Position.Y - Program.BlurOrigin.Y;
             double hyp         = Math.Sqrt(dix * dix + diy * diy);
             double dy          = diy / hyp * Program.BlurStrength;
             double dx          = dix / hyp * Program.BlurStrength;
             int    prevOpacity = Opacity;
             Opacity = Program.BlurOpacity;
             double cx = 0;
             double cy = 0;
             while (Opacity > 0)
             {
                 if (FlipHorizontally)
                 {
                     Program.Game.SpriteBatch?.Draw(Texture, new Rectangle((int)(Position.X + cx + cax), (int)(Position.Y + cy + cay), (int)(Width * Scale), (int)(Height * Scale)), null, Tint * (Opacity / 255.0f), Orientation, new Vector2(Texture.Width / 2.0f, Texture.Height / 2.0f), SpriteEffects.FlipHorizontally, Layer);
                 }
                 else
                 {
                     Program.Game.SpriteBatch?.Draw(Texture, new Rectangle((int)(Position.X + cx + cax), (int)(Position.Y + cy + cay), (int)(Width * Scale), (int)(Height * Scale)), null, Tint * (Opacity / 255.0f), Orientation, new Vector2(Texture.Width / 2.0f, Texture.Height / 2.0f), SpriteEffects.None, Layer);
                 }
                 Opacity -= 25;
                 cx      += dx;
                 cy      += dy;
             }
             Opacity = prevOpacity;
         }
         else
         {
             if (FlipHorizontally)
             {
                 Program.Game.SpriteBatch?.Draw(Texture, new Rectangle(Position.X + cax, Position.Y + cay, (int)(Width * Scale), (int)(Height * Scale)), null, Tint * (Opacity / 255.0f), Orientation, new Vector2(Texture.Width / 2.0f, Texture.Height / 2.0f), SpriteEffects.FlipHorizontally, Layer);
             }
             else
             {
                 Program.Game.SpriteBatch?.Draw(Texture, new Rectangle(Position.X + cax, Position.Y + cay, (int)(Width * Scale), (int)(Height * Scale)), null, Tint * (Opacity / 255.0f), Orientation, new Vector2(Texture.Width / 2.0f, Texture.Height / 2.0f), SpriteEffects.None, Layer);
             }
         }
         //Program.Game.SpriteBatch?.Draw(Texture, new Rectangle(position.X, position.Y, Texture.Width, Texture.Height), null, Color.White, Orientation, new Vector2(Texture.Width / 2.0f, Texture.Height / 2.0f), SpriteEffects.None, Layer);
         //Program.Game.SpriteBatch?.Draw(Texture, position.ToVector2());
         WrapInCollider();
     }
     else
     {
         Console.WriteLine("Detected null texture, skipping set.");
     }
 }
コード例 #37
0
ファイル: NovaAnimation.cs プロジェクト: Lunatic-Works/Nova
 public static bool IsPlayingAny(AnimationType type = AnimationType.All)
 {
     return(Animations.Any(animation => type.HasFlag(animation.type) && animation.isPlaying));
 }
コード例 #38
0
        private MotionTextElement SelectMotionType(AnimationType animationType, GameObject go)
        {
            MotionTextElement motion;

            switch (animationType)
            {
            case AnimationType.BasicFadeInOut:
                motion = go.AddComponent <BasicFadeInOut>();
                break;

            case AnimationType.BasicGameTextBoxAnimation:
                motion = go.AddComponent <BasicGameTextBoxAnimation>();
                break;

            case AnimationType.Slash:
                motion = go.AddComponent <BackgroundSlashs>();
                break;

            case AnimationType.CutSlash:
                motion = go.AddComponent <CutSlash>();
                break;

            case AnimationType.LaidWords:
                motion = go.AddComponent <LaidWords>();
                break;

            case AnimationType.LaidWords_FromTheLeft:
                motion = go.AddComponent <LaidWords_FromTheLeft>();
                break;

            case AnimationType.LineCircle:
                motion = go.AddComponent <LineCircleMotion>();
                break;

            case AnimationType.VerticalFlow:
                motion = go.AddComponent <VerticalFlow>();
                break;

            case AnimationType.LineRect:
                motion = go.AddComponent <LineRectMotion>();
                break;

            case AnimationType.RectReactionText:
                motion = go.AddComponent <RectReactionText>();
                break;

            case AnimationType.SineWave:
                motion = go.AddComponent <SineWave>();
                break;

            case AnimationType.HorizontalFlow:
                motion = go.AddComponent <HorizontalFlow>();
                break;

            case AnimationType.HorizontalLines:
                motion = go.AddComponent <HorizontalLines>();
                break;

            case AnimationType.FlowUp:
                motion = go.AddComponent <FlowUp>();
                break;

            case AnimationType.VerticalLines:
                motion = go.AddComponent <VerticalLines>();
                break;

            case AnimationType.PopUpWords:
                motion = go.AddComponent <PopUpWords>();
                break;

            case AnimationType.SlideIn_LeftToRight:
                motion = go.AddComponent <SlideIn_LeftToRight>();
                break;

            case AnimationType.SlideIn_RightToLeft:
                motion = go.AddComponent <SlideIn_RightToLeft>();
                break;

            default:
                motion = go.AddComponent <BasicFadeInOut>();
                break;
            }


            motion.AnimationCurveAsset = AnimationCurves;
            motion.Graphics            = graphics;
//            motion.TmProCapture = tmProCapture;



            return(motion);
        }
コード例 #39
0
ファイル: AnimationTypeApi.cs プロジェクト: yungshing/War3Net
 public static AnimationType ConvertAnimType(int i)
 {
     return(AnimationType.GetAnimationType(i));
 }
コード例 #40
0
 /// <summary> Initializes a new instance of the UIAnimations.Database class, of the given type (AnimationType) </summary>
 /// <param name="animationType"> The animation type that determines what type of UIAnimationDatabase databases this database contains </param>
 public UIAnimationsDatabase(AnimationType animationType)
 {
     DatabaseType  = animationType;
     Databases     = new List <UIAnimationDatabase>();
     DatabaseNames = new List <string>();
 }
コード例 #41
0
        public AnimationClip(ObjectReader reader) : base(reader)
        {
            if (version[0] >= 5)//5.0 and up
            {
                m_Legacy = reader.ReadBoolean();
            }
            else if (version[0] >= 4)//4.0 and up
            {
                m_AnimationType = (AnimationType)reader.ReadInt32();
                if (m_AnimationType == AnimationType.kLegacy)
                {
                    m_Legacy = true;
                }
            }
            else
            {
                m_Legacy = true;
            }
            m_Compressed = reader.ReadBoolean();
            if (version[0] > 4 || (version[0] == 4 && version[1] >= 3))//4.3 and up
            {
                m_UseHighQualityCurve = reader.ReadBoolean();
            }
            reader.AlignStream();
            int numRCurves = reader.ReadInt32();

            m_RotationCurves = new QuaternionCurve[numRCurves];
            for (int i = 0; i < numRCurves; i++)
            {
                m_RotationCurves[i] = new QuaternionCurve(reader);
            }

            int numCRCurves = reader.ReadInt32();

            m_CompressedRotationCurves = new CompressedAnimationCurve[numCRCurves];
            for (int i = 0; i < numCRCurves; i++)
            {
                m_CompressedRotationCurves[i] = new CompressedAnimationCurve(reader);
            }

            if (version[0] > 5 || (version[0] == 5 && version[1] >= 3))//5.3 and up
            {
                int numEulerCurves = reader.ReadInt32();
                m_EulerCurves = new Vector3Curve[numEulerCurves];
                for (int i = 0; i < numEulerCurves; i++)
                {
                    m_EulerCurves[i] = new Vector3Curve(reader);
                }
            }

            int numPCurves = reader.ReadInt32();

            m_PositionCurves = new Vector3Curve[numPCurves];
            for (int i = 0; i < numPCurves; i++)
            {
                m_PositionCurves[i] = new Vector3Curve(reader);
            }

            int numSCurves = reader.ReadInt32();

            m_ScaleCurves = new Vector3Curve[numSCurves];
            for (int i = 0; i < numSCurves; i++)
            {
                m_ScaleCurves[i] = new Vector3Curve(reader);
            }

            int numFCurves = reader.ReadInt32();

            m_FloatCurves = new FloatCurve[numFCurves];
            for (int i = 0; i < numFCurves; i++)
            {
                m_FloatCurves[i] = new FloatCurve(reader);
            }

            if (version[0] > 4 || (version[0] == 4 && version[1] >= 3)) //4.3 and up
            {
                int numPtrCurves = reader.ReadInt32();
                m_PPtrCurves = new PPtrCurve[numPtrCurves];
                for (int i = 0; i < numPtrCurves; i++)
                {
                    m_PPtrCurves[i] = new PPtrCurve(reader);
                }
            }

            m_SampleRate = reader.ReadSingle();
            m_WrapMode   = reader.ReadInt32();
            if (version[0] > 3 || (version[0] == 3 && version[1] >= 4)) //3.4 and up
            {
                m_Bounds = new AABB(reader);
            }
            if (version[0] >= 4)//4.0 and up
            {
                m_MuscleClipSize = reader.ReadUInt32();
                m_MuscleClip     = new ClipMuscleConstant(reader);
            }
            if (version[0] > 4 || (version[0] == 4 && version[1] >= 3)) //4.3 and up
            {
                m_ClipBindingConstant = new AnimationClipBindingConstant(reader);
            }
            if (version[0] > 2018 || (version[0] == 2018 && version[1] >= 3)) //2018.3 and up
            {
                var m_HasGenericRootTransform = reader.ReadBoolean();
                var m_HasMotionFloatCurves    = reader.ReadBoolean();
                reader.AlignStream();
            }
            int numEvents = reader.ReadInt32();

            m_Events = new AnimationEvent[numEvents];
            for (int i = 0; i < numEvents; i++)
            {
                m_Events[i] = new AnimationEvent(reader);
            }
            if (version[0] >= 2017) //2017 and up
            {
                reader.AlignStream();
            }
        }
コード例 #42
0
 /// <summary> Initializes a new instance of the <see cref="Fade" /> class </summary>
 /// <param name="animationType"> The animation type that determines the behavior of this animation </param>
 public Fade(AnimationType animationType)
 {
     Reset(animationType);
 }
コード例 #43
0
 /// <summary> Initializes a new instance of the <see cref="Scale" /> class </summary>
 /// <param name="animationType"> The animation type that determines the behavior of this animation </param>
 public Scale(AnimationType animationType)
 {
     Reset(animationType);
 }
コード例 #44
0
 /// <summary> Initializes a new instance of the <see cref="Rotate" /> class </summary>
 /// <param name="animationType"> The animation type that determines the behavior of this animation </param>
 public Rotate(AnimationType animationType)
 {
     Reset(animationType);
 }
コード例 #45
0
 public void LoopAnimation(Animation animation)
 {
     IsAnimated    = true;
     AnimationType = AnimationType.Loop;
     Animation     = animation;
 }
コード例 #46
0
 public override void Update(AnimationType newAnimation, Color ledColor)
 {
     this.animationType = newAnimation;
     this.ledColor      = ledColor;
     this.shouldUpdate  = true;
 }
コード例 #47
0
 public void LoopAnimation(Animation animation, int loops)
 {
     AnimationType = AnimationType.LimitedLoop;
 }
コード例 #48
0
        /// <summary>Generates a new AnimatedSpriteCollection object from the data held in an asset sheet.</summary>
        /// <param name="assetSheet">An asset sheet that holds the data for textures.</param>
        /// <param name="type">The type of asset to get from the sheet. Hair, eyes, shoes, etc.</param>
        public AnimatedSpriteCollection getSpriteCollectionFromSheet(AssetSheet assetSheet, AnimationType type)
        {
            var left  = new AnimatedSpriteExtended(assetSheet.clone().getTexture(Direction.left, type), assetSheet);
            var right = new AnimatedSpriteExtended(assetSheet.clone().getTexture(Direction.right, type), assetSheet);
            var up    = new AnimatedSpriteExtended(assetSheet.clone().getTexture(Direction.up, type), assetSheet);
            var down  = new AnimatedSpriteExtended(assetSheet.clone().getTexture(Direction.down, type), assetSheet);

            return(new AnimatedSpriteCollection(left, right, up, down, Direction.down));
        }
コード例 #49
0
ファイル: NovaAnimation.cs プロジェクト: Lunatic-Works/Nova
 public static float GetTotalTimeRemaining(AnimationType type = AnimationType.All)
 {
     return((from animation in Animations where type.HasFlag(animation.type) select animation.totalTimeRemaining)
            .Max());
 }
コード例 #50
0
        /// <summary>Generate a Standard Character Animation from some asset sheets. (collection of textures to animations)</summary>
        /// <param name="body">The textures for the NPC's body.</param>
        /// <param name="eyes">The textures for the NPC's eyes.</param>
        /// <param name="hair">The textures for the NPC's hair.</param>
        /// <param name="shirt">The textures for the NPC's shirt.</param>
        /// <param name="pants">The textures for the NPC's pants.</param>
        /// <param name="shoes">The textures for the NPC's shoes.</param>
        /// <param name="accessories">The textures for the NPC's accessories.</param>
        /// <param name="animationType">The animation type to generate.</param>
        /// <param name="drawColors">The colors for the NPC's different assets.</param>
        public virtual StandardCharacterAnimation generateCharacterAnimation(AssetSheet body, AssetSheet eyes, AssetSheet hair, AssetSheet shirt, AssetSheet pants, AssetSheet shoes, List <AssetSheet> accessories, AnimationType animationType, StandardColorCollection drawColors = null)
        {
            AnimatedSpriteCollection bodySprite  = this.getSpriteCollectionFromSheet(body, animationType);
            AnimatedSpriteCollection eyesSprite  = this.getSpriteCollectionFromSheet(eyes, animationType);
            AnimatedSpriteCollection hairSprite  = this.getSpriteCollectionFromSheet(hair, animationType);
            AnimatedSpriteCollection shirtSprite = this.getSpriteCollectionFromSheet(shirt, animationType);
            AnimatedSpriteCollection pantsSprite = this.getSpriteCollectionFromSheet(pants, animationType);
            AnimatedSpriteCollection shoesSprite = this.getSpriteCollectionFromSheet(shoes, animationType);

            List <AnimatedSpriteCollection> accessoryCollection = new List <AnimatedSpriteCollection>();

            foreach (var v in accessories)
            {
                AnimatedSpriteCollection acc = this.getSpriteCollectionFromSheet(v, AnimationType.standing);
                accessoryCollection.Add(acc);
            }

            if (drawColors == null)
            {
                drawColors = new StandardColorCollection();
            }

            return(new StandardCharacterAnimation(bodySprite, eyesSprite, hairSprite, shirtSprite, pantsSprite, shoesSprite, accessoryCollection, drawColors));
        }
コード例 #51
0
 public void SetAnimation(AnimationType type)
 {
     this.type = type;
 }
コード例 #52
0
 public RPGAnimation(AnimationType t) : this(t, new TimeSpan(0, 0, 0, 0, 250))
 {
 }
コード例 #53
0
 void SetAnimation(AnimationType animType)
 {
     _animation.CrossFade(animType.ToString());
 }
コード例 #54
0
 public RPGAnimation(AnimationType t, TimeSpan duration)
 {
     this.AnimType = t;
     this.Duration = duration;
     Start         = DateTime.Now;
 }
コード例 #55
0
ファイル: ItemsGroupAnimation.cs プロジェクト: slabson/Match3
 public override void ChangePosition(Vector2 destination, AnimationType animType = null)
 {
     this.animType = animType ?? AnimManager.FallDownItems;
     base.ChangePosition(destination, animType);
 }
コード例 #56
0
ファイル: ZoomAnimation.cs プロジェクト: Deneyr/Metempsychoid
 public ZoomAnimation(float zoomFrom, float zoomTo, Time animationPeriod, AnimationType type, InterpolationMethod method) :
     base(zoomFrom, zoomTo, animationPeriod, type, method)
 {
 }
コード例 #57
0
    public static List <UnityEngine.AnimationClip> Import(string bundlePath, string savePath, string targetBundleName, AnimationType type,
                                                          UnityEngine.SkinnedMeshRenderer[] skinnedMeshRenderers)
    {
        string animationNamePrefix   = type == AnimationType.Eyes ? "ey_" : "mo_";
        string materialAttributeName = type == AnimationType.Eyes ? "_MainTex_eye_ST" : "_MainTex_mouth_ST";
        var    attributeSet          = type == AnimationType.Eyes ? _eyeAnimAttributes : _mouthAnimAttributes;

        var assetManager = new AssetsManager();

        assetManager.LoadFiles(PhysicalFileSystem.Instance, bundlePath);
        var assetFile = assetManager.assetsFileList[0];

        var animationClips = assetFile.Objects.OfType <AssetStudio.AnimationClip>()
                             .Where(clip => clip.m_Name.StartsWith(animationNamePrefix));

        var importedAssets = new List <UnityEngine.AnimationClip>();

        foreach (var animationClip in animationClips)
        {
            var newClip = ProcessClip(animationClip, savePath, targetBundleName, materialAttributeName, attributeSet,
                                      skinnedMeshRenderers);
            importedAssets.Add(newClip);
        }

        return(importedAssets);
    }
コード例 #58
0
        IEnumerator LightAnimator()
        {
            int playingIndex = 0;

            nowPlaying  = animationClips[playingIndex].type;
            LightStates = new bool[Light.Count];
            while (isLoop)
            {
                //check what stat now it is
                animationClips[playingIndex].AnimationSetting.stateSelector();
                switch (animationClips[playingIndex].m_animation.nowState)
                {
                case AnimationPrototype.animationState.start:
                    animationClips[playingIndex].AnimationSetting.InitializeAnimation(ref LightStates);
                    break;

                case AnimationPrototype.animationState.update:
                    animationClips[playingIndex].m_animation.UpdateAnimation(ref LightStates);
                    break;

                case AnimationPrototype.animationState.end:
                    animationClips[playingIndex].m_animation.EndAnimation(ref LightStates);
                    playingIndex += 1;
                    if (playingIndex >= animationClips.Count)
                    {
                        playingIndex = 0;
                    }
                    nowPlaying = animationClips[playingIndex].type;
                    break;
                }

                // for (int i = 0; i < Light.Count;i++)
                // {
                //     if(LightStates[i] ^ isUseGlobalAntiLogic )
                //     {
                //         Light[i].GetComponent<MeshRenderer>().enabled= LightStates[i] ^ isUseGlobalAntiLogic;
                //     }
                //     else{

                //     }

                // }

                Color[] listColor = new Color[Light.Count];
                Color   color1    = animationClips[playingIndex].color1;
                Color   color2    = animationClips[playingIndex].color2;
                int     max       = animationClips[playingIndex].m_animation.max;
                int     min       = animationClips[playingIndex].m_animation.min;
                float   center    = animationClips[playingIndex].m_animation.center;

                for (int i = 0; i < Light.Count; i++)
                {
                    //Debug.Log("min : " + min + " max : " + max + " i : " + i + " i-max : " + i_max + " i-min : " + i_min);
                    if (LightStates[i] ^ isUseGlobalAntiLogic)
                    {
                        float index  = i >= center ? i - center : center - i;
                        float length = i >= center ? max - center: center - min;
                        listColor[i] = Color.Lerp(color2, color1, index / length);
                    }
                    else
                    {
                        listColor[i] = color1;
                    }
                    Light[i].GetComponent <MeshRenderer>().material.SetColor("_Color", listColor[i]);
                }
                yield return(new WaitForSeconds(1 / frameRate));
            }
        }
コード例 #59
0
    public void PlayAnim(AnimationType type, bool state, int index = 0, bool mustLive = true, bool force = false)
    {
        if (mustLive && !this.self.isLive)
        {
            return;
        }
        if (!this.self.isHero && !this.self.isVisibleInCamera)
        {
            return;
        }
        if (this.self.IsLockAnimState && !force)
        {
            return;
        }
        if (this.mecanim != null)
        {
            switch (type)
            {
            case AnimationType.Breath:
                this.curAnimState = AnimControllerState.Other;
                this.mecanim.Idle(state);
                break;

            case AnimationType.Move:
                if (!this.self.CanMoveAnim && state && this.self.isHero)
                {
                    return;
                }
                this.curAnimState = AnimControllerState.Move;
                if (this.self.isMonster && this.self.teamType == 2 && this.firstTime && !state)
                {
                    this.firstTime = false;
                }
                else
                {
                    this.mecanim.Move(state);
                }
                break;

            case AnimationType.Damage:
                this.mecanim.HitUp(state);
                break;

            case AnimationType.Death:
                if (!this.self.isBuilding)
                {
                    this.curAnimState = AnimControllerState.Death;
                    this.ResetAnimState();
                    this.mecanim.Death(state);
                }
                break;

            case AnimationType.HitStun:
                this.mecanim.HitStun(state);
                break;

            case AnimationType.ComboAttack:
                this.curAnimState = AnimControllerState.Attack;
                if (state)
                {
                    this.mecanim.ComboAttack(index);
                }
                else
                {
                    this.mecanim.ComboAttack(0);
                }
                break;

            case AnimationType.Conjure:
                this.curAnimState = AnimControllerState.Skill;
                if (state)
                {
                    this.mecanim.Conjure(index);
                }
                else
                {
                    this.mecanim.Conjure(0);
                }
                break;

            case AnimationType.StandUp:
                this.curAnimState = AnimControllerState.Other;
                this.mecanim.StandUp(state);
                break;

            case AnimationType.Victory:
                this.curAnimState = AnimControllerState.Other;
                this.mecanim.Victory(state);
                break;

            case AnimationType.Failure:
                this.curAnimState = AnimControllerState.Other;
                this.mecanim.Failure(state);
                break;

            case AnimationType.BackHome:
                this.curAnimState = AnimControllerState.Other;
                this.mecanim.Home(state);
                break;

            case AnimationType.Sleep:
                this.curAnimState = AnimControllerState.Other;
                this.mecanim.Sleep(index);
                break;
            }
        }
    }
コード例 #60
0
 public UniAniAudioSource(List <UniAni> uniAniList_, AudioSource audioSource_, float volume_, float animeTime_, AnimationCurve curve_, AnimationType animationType_) :
     base(uniAniList_, animeTime_, curve_, animationType_)
 {
     audioSource = audioSource_;
     startVolume = audioSource.volume;
     endVolume   = volume_;
 }