public ActiveVirusBuff(Transform target) : base(target)
 {
     VirusPropEnum   = VirusPropEnum.Active;
     _virusMove      = target.GetComponent <VirusMove>();
     _buffMrg        = target.GetComponent <VirusBuffMrg>();
     _curActiveSpeed = 1;
     _isActive       = true;
 }
Exemplo n.º 2
0
 public WeakenVirusBuff(Transform target)
     : base(target)
 {
     _curWeakenSpeed = 1;
     VirusPropEnum   = VirusPropEnum.Weaken;
     _virusMove      = target.GetComponent <VirusMove>();
     _buffMrg        = target.GetComponent <VirusBuffMrg>();
     _isActive       = true;
 }
Exemplo n.º 3
0
    public virtual void Born(VirusData virusData)
    {
        VirusSprite = transform.GetComponent <BaseVirusSprite>();
        VirusSprite.Initi(virusData.VirusColorLevel);
        VirusHealth       = new RectiveProperty <float>();
        VirusHealth.Value = virusData.HealthValue;
        HealthBar.Initi(VirusTool.GetStrByIntger(virusData.HealthValue));
        VirusHealth.Subscibe(HealthBar.SetValue);

        SplitLevel       = virusData.SplitLevel;
        CurColorLevel    = virusData.VirusColorLevel;
        OriginColorLevel = virusData.VirusColorLevel;
        TotalHealth      = virusData.HealthValue;

        ScaleX = VirusTool.GetScaleByLevel(virusData.SplitLevel);
        transform.localScale = new Vector3(ScaleX, ScaleX, 1);
        VirusMove.Initi(virusData.MoveSpeed, virusData.MoveDirection);

        transform.GetComponent <VirusBuffMrg>().Initi();
        IsDeath = false;
    }