// Start is called before the first frame update
    void Start()
    {
        tag    = "Player";
        health = GetComponent <Health>();
        health.EventTakeDamage   += OnTakeDamage;
        health.EventReciveHealth += OnReciveHealth;
        health.EventDeath        += OnDeath;

        firstPersonCamera = GetComponent <FirstPersonCamera>();
        normalAttack      = GetComponentInChildren <Weapon>();
        movement          = GetComponent <Movement>();
        jump      = GetComponent <PlayerJump>();
        command   = GetComponent <PlayerCommand>();
        skillTree = GetComponent <SkillTree>();

        drone = FindObjectOfType <DroneAi>();

        virusData = GetComponent <PlayerVirusData>();

        PlayerVirusData.OnResourceChanged += PlayerVirusData_OnResourceChanged;

        UpdateHealthText();
        ResourceText.text = virusData.ToString();
        flashBaseColor    = flashImage.color;
    }
 private void Awake()
 {
     if (instance)
     {
         Destroy(this);
     }
     else
     {
         instance = this;
     }
 }