Android开发Android技术知识Android开发

MorbidMask(吸血面具)-安全快速的对Activity或

2019-07-23  本文已影响114人  Season_zlc
MorbidMask.png

物品介绍:

攻击者每次攻击都将根据造成的伤害回复15%的生命值。
吸血:15%

Github地址

Start

First Blood

Double Kill

接下来尝试给Fragment传递参数.

Triple Kill

传递自定义数据类型

除了上述基本数据类型外,还支持自定义的数据类型.

自定义数据类型默认使用Gson进行序列化和反序列化, 因此请在release环境中Keep自定义的数据类型, 以免发生问题!

Ultra Kill

利用MutableParams注解生成 var 类型参数.

如上所见, 通过Params注解只能定义val不可变类型的参数, 要想定义var可变类型的参数, 可以通过
MutableParamsVar声明可变类型的参数.

例如:

@Params(
    Val("charParam", Char::class),
    Val("booleanParam", Boolean::class),
    Val("stringParam", String::class)
)
@MutableParams(
    Var("test", String::class),
    Var("test1", Boolean::class)
)
class TestActivity : AppCompatActivity() 

License

Copyright 2019 Season.Zlc

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
上一篇下一篇

猜你喜欢

热点阅读