コード例 #1
0
    static void AddBuff(int buffId, GameObject o)
    {
        var buffC = BuffConfig.Get(buffId);
        var type  = CONSTANT.CONST.BUFF_PERFIX + Enum.GetName(typeof(ENUM_EFFECT), buffC.EffectType);
        var buff  = o.AddComponent(Type.GetType(type)) as Buff;

        buff.BuffId = buffId;
    }
コード例 #2
0
 protected void Start()
 {
     config   = BuffConfig.Get(BuffId);
     lifeTime = config.Duration / 1000f;
     delay    = config.Delay / 1000f;
     period   = config.Period / 1000f;
     ppt      = GetComponent <Property>();
 }