示例#1
0
        public override bool UseItem(Player player)
        {
            DBTPlayer dbtPlayer = player.GetModPlayer <DBTPlayer>();

            dbtPlayer.ClearTransformations();
            dbtPlayer.AcquiredTransformations.Clear();

            return(true);
        }
示例#2
0
        public override bool UseItem(Player player)
        {
            DBTPlayer dbtPlayer = player.GetModPlayer <DBTPlayer>();

            if (dbtPlayer.FirstTransformation == null)
            {
                dbtPlayer.AcquireAndTransform(TransformationDefinitionManager.Instance.SSJ1);
                return(true);
            }

            TransformationDefinition currentTransformation = dbtPlayer.FirstTransformation.Definition;

            dbtPlayer.ClearTransformations();
            int nextIndex = TransformationDefinitionManager.Instance.GetIndex(currentTransformation) + 1;

            if (nextIndex >= TransformationDefinitionManager.Instance.Count)
            {
                nextIndex = 0;
            }

            dbtPlayer.AcquireAndTransform(TransformationDefinitionManager.Instance[nextIndex]);

            return(true);
        }