Ejemplo n.º 1
0
 //애니메이션을 재생합니다.
 public void PlayAnimation(AnimationType anim) {
     m_current = anim;
     
     //초밥 종류에 따라서 애니메이션을 지정합니다.
     string animName = m_sushiType.ToString() + "_" + m_current.ToString();
     m_animation.Play(animName);
 }
Ejemplo n.º 2
0
    public void CharacterTouch()
    {
        //if (animator.runtimeAnimatorController == Idle && !isTouch)
        //{
        AnimatorStateInfo animatorInfo = animator.GetCurrentAnimatorStateInfo(0);

        if (!isTouch && animatorInfo.IsTag("Idle"))
        {
            isTouch = true;
            AnimationType ani = (AnimationType)Enum.Parse(typeof(AnimationType), touchNum.ToString());
            animator.SetTrigger(ani.ToString());
            Message.Send <CharacterTouchMsg>(new CharacterTouchMsg(ani));

            if (corTouchTimer != null)
            {
                StopCoroutine(TouchTimer());
                corTouchTimer = null;
            }

            touchNum++;
            if (touchNum > (int)AnimationType.Touch4)
            {
                touchNum = (int)AnimationType.Touch0;
            }

            corTouchTimer = StartCoroutine(TouchTimer());
        }
    }
Ejemplo n.º 3
0
    //애니메이션을 재생합니다.
    public void PlayAnimation(AnimationType anim)
    {
        m_current = anim;

        //초밥 종류에 따라서 애니메이션을 지정합니다.
        string animName = m_sushiType.ToString() + "_" + m_current.ToString();

        m_animation.Play(animName);
    }
Ejemplo n.º 4
0
    public void setAnimBool(AnimationType type, bool result)
    {
        string strType = type.ToString();

        if (anim.GetBool(strType) == result) // 같으면 return;
        {
            return;
        }
        anim.SetBool(strType, result);
    }
Ejemplo n.º 5
0
    public Animation(AnimationType inType, int inputNumber, GameObject parent, Vector3 translation, Vector3 scale)
    {
        this.type = inType;

        this.animationObject = new GameObject("Ani Type: " + inType.ToString());
        this.animationObject.transform.parent        = parent.transform;
        this.animationObject.transform.localPosition = translation;
        this.animationObject.transform.localScale    = scale;


        this.animationRunner = this.animationObject.AddComponent <AnimationRunner>();
    }
Ejemplo n.º 6
0
    public void ChangeAnimation(AnimationHolder animationHolder)
    {
        AnimationType type = animationHolder.animationType;

        if (!spriteMeshes.ContainsKey(type))
        {
            Debug.Log("Animation type change not implemented:" + type.ToString());
            return;
        }
        animationHolders[animationHolder.animationType]        = animationHolder;
        spriteMeshes[animationHolder.animationType].spriteMesh = animationHolder.front;
    }
Ejemplo n.º 7
0
        /// <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;

			if (endTime < startTime)
				throw new CompilerException(-1, 404, animationType.ToString(), startTime.ToString(), endTime.ToString());
        }
Ejemplo n.º 8
0
    // Sets the animation type and subtype that will be used whenever showing or hiding a view controller
    public static void setAnimationTypeAndSubtype( AnimationType type, AnimationSubtype subtype )
    {
        if( Application.platform != RuntimePlatform.OSXEditor )
        {
            // convert the types to strings and lowercase the first letter
            string aType = type.ToString();
            aType = aType.Substring( 0, 1 ).ToLower() + aType.Substring( 1 );
            string aSubtype = subtype.ToString();
            aSubtype = aSubtype.Substring( 0, 1 ).ToLower() + aSubtype.Substring( 1 );

            _nativeToolkitSetAnimationTypeAndSubtype( aType, aSubtype );
        }
    }
Ejemplo n.º 9
0
        public void PlayAnimation(AnimationType type)
        {
            if (_animator == null)
            {
                CrossFade(type.ToString().ToLower());
            }
            AnimatorParam para = AnimatorConfig.GetAnimatorParam(type);

            if (para != null)
            {
                para.ExecuteParam(_animator);
            }
        }
Ejemplo n.º 10
0
    public void SetAnimation(AnimationType type, bool state)
    {
        switch (type)
        {
        case AnimationType.Order:
            _anim.SetBool(type.ToString(), state);
            break;

        case AnimationType.MoveVertical:
            _skinAnimator.SetFloat("MoveVertical", state == true ? 1 : 0);
            break;
        }
    }
Ejemplo n.º 11
0
        public override JObject SaveToJsonObject(StiJsonSaveMode mode)
        {
            var jObject = base.SaveToJsonObject(mode);

            if (Pen != null)
            {
                jObject.Add(new JProperty("Pen", Pen.SaveToJsonObject(mode)));
            }
            jObject.Add(new JProperty("Points", SavePointFArrayToJsonObject(Points)));
            jObject.Add(new JProperty("AnimationType", AnimationType.ToString()));

            return(jObject);
        }
Ejemplo n.º 12
0
 private void PlayAnimation(AnimationType type)
 {
     Sprite[] animationSprites = Animations[type.ToString("g")];
     if (currentAnimationPlayed == type)
     {
         this.DisplayNextSprite(animationSprites);
     }
     else
     {
         // Set the animation to new type and display it from the beginning
         currentAnimationPlayed = type;
         this.DisplayFirstSprite(animationSprites);
     }
 }
Ejemplo n.º 13
0
        /// <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;

            if (endTime < startTime)
            {
                throw new CompilerException(-1, 404, animationType.ToString(), startTime.ToString(), endTime.ToString());
            }
        }
Ejemplo n.º 14
0
        public void DeletePreset(string presetName, AnimationType animationType, ButtonLoopType buttonLoopType = ButtonLoopType.None)
        {
            if (presetName.Equals(DEFAULT_PRESET_NAME))
            {
                Debug.Log("[DoozyUI] You cannot (and should not) delete the default preset '" + DEFAULT_PRESET_NAME + "'.");
                return;
            }

            //Get the full path to the file
            string adjustedFolderPath = GetUIAnimationsFolderPath + animationType.ToString();
            string presetFileName     = presetName + "_" + animationType.ToString() + fileNameExtension;
            string filePath           = adjustedFolderPath + "/" + presetFileName;

            //Load the default preset settings
            LoadPreset(DEFAULT_PRESET_NAME, animationType, buttonLoopType);

            //Delete the preset file
            QuickEngine.IO.File.Delete(filePath);

            //Debug.Log("[DoozyUI] the '" + presetName + "' preset has been DELETED!");

            //Reload the preset list for the animation patch
            LoadPresetList(animationType);
        }
    public static string BuildStateInfo(AnimationType type, string actionID, string stance, InteractionAnimationType interactionType = InteractionAnimationType.Null, bool mirror = false)     //skeleton for later missdeads
    {
        string state = type.ToString() + stance + "." + actionID;

        if (interactionType != InteractionAnimationType.Null)
        {
            state += "_" + interactionType.ToString().ToLower();
        }
        if (mirror)
        {
            state += "_mirror";
        }

        return(state);
    }
Ejemplo n.º 16
0
    IEnumerator PlayAnimationIn(AnimationType type, Action cb)
    {
        var name = type.ToString().ToCharArray();

        name[0] = Char.ToLower(name[0]);
        animator.Play(new string(name));
        yield return(null);

        yield return(new WaitForAnimation(animator, 0));

        coroutine = null;

        if (cb != null)
        {
            cb();
        }
    }
        public override JObject SaveToJsonObject(StiJsonSaveMode mode)
        {
            var jObject = base.SaveToJsonObject(mode);

            if (Background != null)
            {
                jObject.Add(new JProperty("Background", SaveBrushToJsonObject(Background, mode)));
            }
            if (BorderPen != null)
            {
                jObject.Add(new JProperty("BorderPen", BorderPen.SaveToJsonObject(mode)));
            }
            jObject.Add(new JProperty("Rect", SaveRectToJsonObject(Rect)));
            jObject.Add(new JProperty("AnimationType", AnimationType.ToString()));

            return(jObject);
        }
Ejemplo n.º 18
0
    //


    public AnimationArray2d(AnimationType animationType, int[] shape, GameObject parent)
    {
        this.shape                  = shape;
        this.animationType          = animationType;
        this.animationArray2dObject = new GameObject("Ani. Type: " + animationType.ToString() + " sh: " + shape[0].ToString() + ", " + shape[1].ToString());
        this.animationArray2dObject.transform.parent        = parent.transform;
        this.animationArray2dObject.transform.localPosition = new Vector3(0.0f, 0.0f, 0.0f);

        this.animations = new Animation[shape[0]][];
        for (int i = 0; i < shape[0]; i++)
        {
            this.animations[i] = new Animation[shape[1]];
            for (int j = 0; j < shape[1]; j++)
            {
                this.animations[i][j] = new Animation(animationType, 2, this.animationArray2dObject, translationOffset(j, i, shape[1], shape[0]), scaleOffset(shape[1], shape[0]));
            }
        }
    }
Ejemplo n.º 19
0
        public AnimationParams GetAnimationParamsFromType(AnimationType type)
        {
            switch (type)
            {
            case AnimationType.Walk:
                return(WalkParams);

            case AnimationType.Run:
                return(RunParams);

            case AnimationType.SwimSlow:
                return(SwimSlowParams);

            case AnimationType.SwimFast:
                return(SwimFastParams);

            default:
                throw new NotImplementedException(type.ToString());
            }
        }
Ejemplo n.º 20
0
        /// <summary>
        /// Load an animation from the a <see cref="AnimationType"/> enum
        /// </summary>
        ///
        /// <param name="element">Element to load the animation</param>
        /// <param name="animationType">Animation type, search for an <see cref="Storyboard"/> in the ressource</param>
        /// <param name="fromValue">Start value of the animation</param>
        /// <param name="toValue">End value of the animation</param>
        /// <param name="animationTime">Time of the animation in milliseconds</param>
        ///
        /// <returns>
        /// </returns>
        public static async Task LoadAnimation(FrameworkElement element, AnimationType animationType, double fromValue = 0, double toValue = 1, int animationTime = 150)
        {
            // Get the storyboard
            Storyboard storyboard = XUiTheme.XUiDictionaries[$"XUi_Animation{animationType.ToString()}"] as Storyboard;
            DoubleAnimationUsingKeyFrames animationKeyFrames = ((DoubleAnimationUsingKeyFrames)storyboard.Children[0]);

            // Get the start key frame
            EasingDoubleKeyFrame startKeyFrame = ((EasingDoubleKeyFrame)animationKeyFrames.KeyFrames[0]);

            startKeyFrame.Value = fromValue;
            // Get the end key frame
            EasingDoubleKeyFrame endKeyFrame = ((EasingDoubleKeyFrame)animationKeyFrames.KeyFrames[1]);

            endKeyFrame.Value   = toValue;
            endKeyFrame.KeyTime = KeyTime.FromTimeSpan(TimeSpan.FromMilliseconds(animationTime));

            // Apply the storyboard
            storyboard.Begin(element);
            await Task.Delay(animationTime);
        }
    private void OnDrawGizmosSelected()
    {
        if (path == null)
        {
            return;
        }

        var points = path.CopyOfWorldPointsAsF2;

        Gizmos.color = Color.green;
        Gizmos.DrawLine(points[0].ToV3(), points[1].ToV3());
        Gizmos.DrawLine(points[1].ToV3(), points[2].ToV3());
        Gizmos.DrawLine(points[2].ToV3(), points[3].ToV3());
        Gizmos.DrawLine(points[3].ToV3(), points[0].ToV3());

        Handles.Label(points[0].ToV3(), "left_up");
        Handles.Label(points[1].ToV3(), "right_up");
        Handles.Label(points[2].ToV3(), "right_bot");
        Handles.Label(points[3].ToV3(), "left_bot");

        Handles.Label(transform.position, animation.ToString());
    }
    void Start()
    {
        animator = GetComponent <Animator>();

        if (GameManager.Instance.difficulty == GameDifficulty.easy)
        {
            indicator.SetActive(true);
        }
        else
        {
            indicator.SetActive(false);
        }

        if (maskPosition != null)
        {
            if (maskPosition.npcController.hasMask)
            {
                maskPosition.mask.SetActive(true);
            }
            else
            {
                maskPosition.mask.SetActive(false);
            }
        }

        animator.SetBool(animation.ToString(), true);


        if (animation == AnimationType.Sitting)
        {
            animator.SetLayerWeight(1, 1);
        }
        else
        {
            animator.SetLayerWeight(2, 1);
        }
    }
Ejemplo n.º 23
0
        public static CutSceneTest Show(AnimationType type)
        {
            var widget = Create <CutSceneTest>(true);

            widget.skeletonAnimator           = new SkeletonAnimator(widget.gameObject);
            widget.skeletonAnimator.TimeScale = 1f;
            widget.skeletonAnimator.ResetTarget(widget.gameObject);

            if (!widget.skeletonAnimator.ValidateAnimator())
            {
                Destroy(widget.gameObject);
                return(null);
            }

            var animationName = type.ToString().Remove(0, 4);

            var baseLayerIndex = widget.Animator.GetLayerIndex("Base Layer");

            widget.Animator.Play(animationName, baseLayerIndex, 0f);

            Destroy(widget.gameObject, DestroyDelay);

            return(widget);
        }
Ejemplo n.º 24
0
        // Use this for initialization
        public virtual void Start()
        {
            Application.runInBackground = true;
            Manus.ManusInit(out session);
            Manus.ManusSetCoordinateSystem(session, coor_up_t.COOR_Y_UP, coor_handed_t.COOR_LEFT_HANDED);

            Manus.ManusSelectProfile(session, (uint)BoneFormat);

            uint amountOfProfiles = Manus.ManusGetProfileCount(session);

            if (BoneFormat == AnimationType.UE4 && amountOfProfiles == 1)
            {
                Debug.LogError("Body.json does not contain data for the " + BoneFormat.ToString() + " bone format. Replace body.json Check the documentation for more information: https://goo.gl/dfUh66");
            }

            for (int i = 0; i < 2; i++)
            {
                _handValues[i].CloseValue     = CloseValue.Open;
                _handValues[i].OnValueChanged = new ToggleEvent();
            }

            Manus.ManusGetHand(session, (device_type_t)0, out _leftHand);
            Manus.ManusGetHand(session, (device_type_t)1, out _rightHand);
        }
Ejemplo n.º 25
0
        public static BaseObject CreateStaticObject(AnimationType type, int xPos, int yPos)
        {
            BaseObject result = null;

            switch (type)
            {
            case AnimationType.MazeBlue:
                result = new BaseObject()
                {
                    Animation = AnimationFactory.CreateAnimation(AnimationType.MazeBlue)
                };
                break;

            case AnimationType.BigCoin:
                result = new BaseObject()
                {
                    Animation = AnimationFactory.CreateAnimation(AnimationType.BigCoin)
                };
                break;

            case AnimationType.SmallCoin:
                result = new BaseObject()
                {
                    Animation = AnimationFactory.CreateAnimation(AnimationType.SmallCoin),
                };
                break;
            }

            if (result != null)
            {
                result.Name = type.ToString();
                result.Animation.Location = new Coordinate(xPos, yPos);
            }

            return(result);
        }
Ejemplo n.º 26
0
 private static object GetAnimationResource(AnimationType animationType)
 {
     return(Application.Current.TryFindResource(animationType.ToString()));
 }
Ejemplo n.º 27
0
        /// <summary> Creates a new UIAnimationDatabase of the given type and preset category name. Returns a reference to the newly created UIAnimationDatabase </summary>
        /// <param name="databaseType"> Database animations type </param>
        /// <param name="newPresetCategory"> Database (preset category) name </param>
        /// <param name="saveAssets"> Write all unsaved asset changes to disk? </param>
        public UIAnimationDatabase CreateDatabase(AnimationType databaseType, string newPresetCategory, bool saveAssets = false)
        {
#if UNITY_EDITOR
            var database = AssetUtils.CreateAsset <UIAnimationDatabase>(Path.Combine(DoozyPath.UIANIMATIONS_RESOURCES_PATH, databaseType.ToString()), newPresetCategory, ".asset", false, false);
#else
            var database = CreateInstance <UIAnimationDatabase>();
#endif
            database.DatabaseName = newPresetCategory;
            database.name         = database.DatabaseName;
            database.DataType     = databaseType;
            database.RefreshDatabase(false);
            Get(databaseType).AddUIAnimationDatabase(database);
            SetDirty(saveAssets);
            return(database);
        }
Ejemplo n.º 28
0
 public bool IsOnState(AnimationType animationType)
 {
     return(m_animator.GetCurrentAnimatorStateInfo(0).IsName(animationType.ToString()));
 }
Ejemplo n.º 29
0
 void SetAnimation(AnimationType animType)
 {
     _animation.CrossFade(animType.ToString());
 }
Ejemplo n.º 30
0
 public bool TryGet(AnimationType animationType, out AnimationData animationData)
 {
     return TryGet(animationType.ToString().ToLower(), out animationData);
 }
Ejemplo n.º 31
0
 public void Request(AnimationType animationType)
 {
     Request(animationType.ToString().ToLower());
 }
Ejemplo n.º 32
0
        public void SavePreset(string presetName, AnimationType animationType, ButtonLoopType buttonLoopType = ButtonLoopType.None)
        {
            if (presetName.Equals(DEFAULT_PRESET_NAME))
            {
                Debug.Log("[DoozyUI] You cannot save a preset with the name '" + DEFAULT_PRESET_NAME + "'.");
                //return;
            }

            if (string.IsNullOrEmpty(presetName))
            {
                Debug.Log("[DoozyUI] You cannot save a preset with no name.");
                return;
            }

            string adjustedFolderPath = GetUIAnimationsFolderPath + animationType.ToString();
            string presetFileName     = presetName + "_" + animationType.ToString() + fileNameExtension;
            string filePath           = adjustedFolderPath + "/" + presetFileName;

            /*
             * switch (animationType)
             * {
             *  case AnimationType.IN:
             *      InAnimations inAnimations = new InAnimations();
             *      inAnimations = GetUIElement.GetInAnimations;
             *      inAnimations.inAnimationsPresetName = presetName;
             *      FileHelper.writeObjectToFile(filePath, inAnimations, FileHelper.SerializeXML);
             *      //Debug.Log("[DoozyUI] [UIElement] the '" + presetName + "' IN Animations preset has been SAVED!");
             *      break;
             *
             *  case AnimationType.LOOP:
             *      LoopAnimations loopAnimations = new LoopAnimations();
             *      loopAnimations = GetUIElement.GetLoopAnimations;
             *      loopAnimations.loopAnimationsPresetName = presetName;
             *      FileHelper.writeObjectToFile(filePath, loopAnimations, FileHelper.SerializeXML);
             *      //Debug.Log("[DoozyUI] [UIElement] the '" + presetName + "' LOOP Animations preset has been SAVED!");
             *      break;
             *
             *  case AnimationType.OUT:
             *      OutAnimations outAnimations = new OutAnimations();
             *      outAnimations = GetUIElement.GetOutAnimations;
             *      outAnimations.outAnimationsPresetName = presetName;
             *      FileHelper.writeObjectToFile(filePath, outAnimations, FileHelper.SerializeXML);
             *      //Debug.Log("[DoozyUI] [UIElement] the '" + presetName + "' OUT Animations preset has been SAVED!");
             *      break;
             *
             *  case AnimationType.OnClick:
             *      OnClickAnimations onClickAnimationSettings = new OnClickAnimations();
             *      onClickAnimationSettings = GetUIButton.onClickAnimationSettings;
             *      onClickAnimationSettings.onClickAnimationsPresetName = presetName;
             *      FileHelper.writeObjectToFile(filePath, onClickAnimationSettings, FileHelper.SerializeXML);
             *      //Debug.Log("[DoozyUI] [UIButton] the '" + presetName + "' OnClick Animations preset has been SAVED!");
             *      break;
             *
             *  case AnimationType.ButtonLoops:
             *      switch (buttonLoopType)
             *      {
             *          case ButtonLoopType.Normal:
             *              ButtonLoopsAnimations normalAnimationSettings = new ButtonLoopsAnimations();
             *              normalAnimationSettings = GetUIButton.normalAnimationSettings;
             *              normalAnimationSettings.animationsPresetName = presetName;
             *              FileHelper.writeObjectToFile(filePath, normalAnimationSettings, FileHelper.SerializeXML);
             *              //Debug.Log("[DoozyUI] [UIButton] the '" + presetName + "' Normal Animations preset has been SAVED!");
             *              break;
             *
             *          case ButtonLoopType.Highlighted:
             *              ButtonLoopsAnimations highlightedAnimationSettings = new ButtonLoopsAnimations();
             *              highlightedAnimationSettings = GetUIButton.highlightedAnimationSettings;
             *              highlightedAnimationSettings.animationsPresetName = presetName;
             *              FileHelper.writeObjectToFile(filePath, highlightedAnimationSettings, FileHelper.SerializeXML);
             *              //Debug.Log("[DoozyUI] [UIButton] the '" + presetName + "' Highlighted Animations preset has been SAVED!");
             *              break;
             *
             *          case ButtonLoopType.None: //we should not be able to get here
             *              Debug.Log("[DoozyUI] [UIButton] You are trying to save a preset named '" + presetName + "'. Something went wrong and the preset was not saved. This should not happen.");
             *              break;
             *
             *          default:
             *              Debug.Log("[DoozyUI] [UIButton] You are trying to save a preset named '" + presetName + "'. Something went wrong and the preset was not saved. This should not happen.");
             *              break;
             *      }
             *      break;
             * }
             */
            LoadPresetList(animationType);
            LoadPreset(presetName, animationType, buttonLoopType);
        }
Ejemplo n.º 33
0
        protected override void WriteDataXML(XElement ele, ElderScrollsPlugin master)
        {
            XElement subEle;

            ele.TryPathTo("AnimationType", true, out subEle);
            subEle.Value = AnimationType.ToString();

            ele.TryPathTo("AnimationMultiplier", true, out subEle);
            subEle.Value = AnimationMultiplier.ToString("G15");

            ele.TryPathTo("Reach", true, out subEle);
            subEle.Value = Reach.ToString("G15");

            ele.TryPathTo("Flags1", true, out subEle);
            subEle.Value = Flags1.ToString();

            ele.TryPathTo("GripAnimation", true, out subEle);
            subEle.Value = GripAnimation.ToString();

            ele.TryPathTo("AmmoUse", true, out subEle);
            subEle.Value = AmmoUse.ToString();

            ele.TryPathTo("ReloadAnimation", true, out subEle);
            subEle.Value = ReloadAnimation.ToString();

            ele.TryPathTo("MinSpread", true, out subEle);
            subEle.Value = MinSpread.ToString("G15");

            ele.TryPathTo("Spread", true, out subEle);
            subEle.Value = Spread.ToString("G15");

            ele.TryPathTo("Unknown", true, out subEle);
            subEle.Value = Unknown.ToHex();

            ele.TryPathTo("SightFOV", true, out subEle);
            subEle.Value = SightFOV.ToString("G15");

            ele.TryPathTo("Unknown2", true, out subEle);
            subEle.Value = Unknown2.ToString("G15");

            ele.TryPathTo("Projectile", true, out subEle);
            Projectile.WriteXML(subEle, master);

            ele.TryPathTo("BaseVATSToHitChance", true, out subEle);
            subEle.Value = BaseVATSToHitChance.ToString();

            ele.TryPathTo("AttackAnimation", true, out subEle);
            subEle.Value = AttackAnimation.ToString();

            ele.TryPathTo("ProjectileCount", true, out subEle);
            subEle.Value = ProjectileCount.ToString();

            ele.TryPathTo("EmbeddedWeaponActorValue", true, out subEle);
            subEle.Value = EmbeddedWeaponActorValue.ToString();

            ele.TryPathTo("Range/Min", true, out subEle);
            subEle.Value = MinRange.ToString("G15");

            ele.TryPathTo("Range/Max", true, out subEle);
            subEle.Value = MaxRange.ToString("G15");

            ele.TryPathTo("LimbKillBehavior", true, out subEle);
            subEle.Value = LimbKillBehavior.ToString();

            ele.TryPathTo("Flags2", true, out subEle);
            subEle.Value = Flags2.ToString();

            ele.TryPathTo("AttackAnimationMultiplier", true, out subEle);
            subEle.Value = AttackAnimationMultiplier.ToString("G15");

            ele.TryPathTo("FireRate", true, out subEle);
            subEle.Value = FireRate.ToString("G15");

            ele.TryPathTo("ActionPointCost", true, out subEle);
            subEle.Value = ActionPointCost.ToString("G15");

            ele.TryPathTo("Rumble/LeftMotorStrength", true, out subEle);
            subEle.Value = RumbleLeftMotorStrength.ToString("G15");

            ele.TryPathTo("Rumble/RightMotorStrength", true, out subEle);
            subEle.Value = RumbleRightMotorStrength.ToString("G15");

            ele.TryPathTo("Rumble/Duration", true, out subEle);
            subEle.Value = RumbleDuration.ToString("G15");

            ele.TryPathTo("DamageToWeaponMult", true, out subEle);
            subEle.Value = DamageToWeaponMult.ToString("G15");

            ele.TryPathTo("AttackShotsPerSecond", true, out subEle);
            subEle.Value = AttackShotsPerSecond.ToString("G15");

            ele.TryPathTo("ReloadTime", true, out subEle);
            subEle.Value = ReloadTime.ToString("G15");

            ele.TryPathTo("JamTime", true, out subEle);
            subEle.Value = JamTime.ToString("G15");

            ele.TryPathTo("AimArc", true, out subEle);
            subEle.Value = AimArc.ToString("G15");

            ele.TryPathTo("Skill", true, out subEle);
            subEle.Value = Skill.ToString();

            ele.TryPathTo("Rumble/Pattern", true, out subEle);
            subEle.Value = RumblePattern.ToString();

            ele.TryPathTo("Rumble/Wavelength", true, out subEle);
            subEle.Value = RumbleWavelength.ToString("G15");

            ele.TryPathTo("LimbDamageMult", true, out subEle);
            subEle.Value = LimbDamageMult.ToString("G15");

            ele.TryPathTo("ResistanceType", true, out subEle);
            subEle.Value = ResistanceType.ToString();

            ele.TryPathTo("SightUsage", true, out subEle);
            subEle.Value = SightUsage.ToString("G15");

            ele.TryPathTo("SemiAutomaticFireDelay/Min", true, out subEle);
            subEle.Value = SemiAutomaticFireDelayMin.ToString("G15");

            ele.TryPathTo("SemiAutomaticFireDelay/Max", true, out subEle);
            subEle.Value = SemiAutomaticFireDelayMax.ToString("G15");

            ele.TryPathTo("Unknown3", true, out subEle);
            subEle.Value = Unknown3.ToString("G15");

            ele.TryPathTo("Mods/Mod1/Effect", true, out subEle);
            subEle.Value = Mod1Effect.ToString();

            ele.TryPathTo("Mods/Mod2/Effect", true, out subEle);
            subEle.Value = Mod2Effect.ToString();

            ele.TryPathTo("Mods/Mod3/Effect", true, out subEle);
            subEle.Value = Mod3Effect.ToString();

            ele.TryPathTo("Mods/Mod1/ValueA", true, out subEle);
            subEle.Value = Mod1ValueA.ToString("G15");

            ele.TryPathTo("Mods/Mod2/ValueA", true, out subEle);
            subEle.Value = Mod2ValueA.ToString("G15");

            ele.TryPathTo("Mods/Mod3/ValueA", true, out subEle);
            subEle.Value = Mod3ValueA.ToString("G15");

            ele.TryPathTo("PowerAttackAnimation", true, out subEle);
            subEle.Value = PowerAttackAnimation.ToString();

            ele.TryPathTo("StrengthRequirement", true, out subEle);
            subEle.Value = StrengthRequirement.ToString();

            ele.TryPathTo("Unknown4", true, out subEle);
            subEle.Value = Unknown4.ToString();

            ele.TryPathTo("Mods/Mod1/ReloadAnimation", true, out subEle);
            subEle.Value = Mod1ReloadAnimation.ToString();

            ele.TryPathTo("Unknown5", true, out subEle);
            subEle.Value = Unknown5.ToHex();

            ele.TryPathTo("AmmoRegenRate", true, out subEle);
            subEle.Value = AmmoRegenRate.ToString("G15");

            ele.TryPathTo("KillImpulse", true, out subEle);
            subEle.Value = KillImpulse.ToString("G15");

            ele.TryPathTo("Mods/Mod1/ValueB", true, out subEle);
            subEle.Value = Mod1ValueB.ToString("G15");

            ele.TryPathTo("Mods/Mod2/ValueB", true, out subEle);
            subEle.Value = Mod2ValueB.ToString("G15");

            ele.TryPathTo("Mods/Mod3/ValueB", true, out subEle);
            subEle.Value = Mod3ValueB.ToString("G15");

            ele.TryPathTo("ImpulseDistance", true, out subEle);
            subEle.Value = ImpulseDistance.ToString("G15");

            ele.TryPathTo("SkillRequirement", true, out subEle);
            subEle.Value = SkillRequirement.ToString();
        }
Ejemplo n.º 34
0
        /// <summary> [Editor Only] Adds the 'Uncategorized' database if it's missing </summary>
        private void AddTheDefaultUIAnimationDatabase()
        {
            if (Contains(UIAnimations.DEFAULT_DATABASE_NAME))
            {
                return;
            }

#if UNITY_EDITOR
            var asset = AssetDatabase.LoadAssetAtPath <UIAnimationDatabase>(Path.Combine(Path.Combine(DoozyPath.UIANIMATIONS_RESOURCES_PATH, DatabaseType.ToString()), UIAnimations.DEFAULT_DATABASE_NAME + ".asset"));
            if (asset != null)
            {
                Databases.Add(asset);
                UpdateDatabaseNames();
                return;
            }

            UIAnimationDatabase database = AssetUtils.CreateAsset <UIAnimationDatabase>(Path.Combine(DoozyPath.UIANIMATIONS_RESOURCES_PATH, DatabaseType.ToString()), UIAnimations.DEFAULT_DATABASE_NAME);
#else
            UIAnimationDatabase database = ScriptableObject.CreateInstance <UIAnimationDatabase>();
#endif
            if (database == null)
            {
                return;
            }
            database.DatabaseName = UIAnimations.DEFAULT_DATABASE_NAME;
            database.name         = database.DatabaseName;
            database.DataType     = DatabaseType;
            database.RefreshDatabase(false);
            Databases.Add(database);
        }
Ejemplo n.º 35
0
 /// <summary>
 ///
 /// </summary>
 /// <returns></returns>
 public override string ToString()
 {
     return(AnimationType.ToString());
 }