Beispiel #1
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;
    }
 public void BindView(UIMainPanel mainPanel)
 {
     _percent.Subscibe(mainPanel.SetLeftVirus);
 }