Exemple #1
0
    public override void Damage(bool value)
    {
        base.Damage(damageCom);
        HittedMatEffect sc = gameObject.GetComponent <HittedMatEffect>();

        if (null == sc)
        {
            sc = gameObject.AddComponent <HittedMatEffect>();
        }
        sc.Active();
        sc.SetColor(Color.red);
    }
Exemple #2
0
 // Update is called once per frame
 void Update()
 {
     if (Input.GetMouseButtonDown(0))
     {
         HittedMatEffect sc = gameObject.GetComponent <HittedMatEffect>();
         if (null == sc)
         {
             sc = gameObject.AddComponent <HittedMatEffect>();
         }
         sc.Active();
         sc.SetColor(Color.red);
     }
 }