示例#1
0
 public void Generate(SlowCube source)
 {
     damage           = source.damage;
     attackType       = source.attackType;
     targetType       = source.targetType;
     bulletPrefab     = source.bulletPrefab;
     isTracing        = source.isTracing;
     hitEffect        = source.hitEffect;
     slowDuration     = source.slowDuration;
     slowSpeedPercent = source.slowSpeedPercent;
 }
示例#2
0
    public void TakeSlowDebuff(SlowCube sc)
    {
        SlowDebuff newSlowDebuff = new SlowDebuff
        {
            attackType = sc.attackType,
            duration   = sc.slowDuration,
            timer      = sc.slowDuration
        };

        if (slowDebuff == null || newSlowDebuff > slowDebuff)
        {
            slowDebuff   = newSlowDebuff;
            currentSpeed = speed * slowDebuff.slowPercent;
        }
    }