Example #1
0
    // Update is called once per frame
    void Update()
    {
        if (parasiting)
        {
            if (Input.GetButton("Parasitage"))
            {
                para += Time.deltaTime;
            }
        }
        if (Input.GetButtonUp("Parasitage"))
        {
            FxParasite.SetActive(false);
        }
        if (Input.GetButtonDown("Parasitage"))
        {
            FxParasite.SetActive(true);
        }

        if (para >= TempsCorrupt)
        {
            CoeurCorrupt = CoeurCorrupt + 1;
            para         = 0;
        }
        if (Input.GetButtonUp("Parasitage") && para < TempsCorrupt)
        {
            para = 0;
        }
    }
Example #2
0
 private void Awake()
 {
     FxParasite.SetActive(false);
     instance = this;
 }
Example #3
0
 // Start is called before the first frame update
 void Start()
 {
     FxParasite.SetActive(false);
     Type = 0;
 }