Exemple #1
0
    private void DamageCameraShake()
    {
        SpringArm.GetInstance().DoShakeCamera(0.5f, 0.1f);
        float intensity = (HeroCharacter.GetInstance().CurrentHealth % 3 == 0) ? 1f : 0.3f;

        //If the heart piece is the last in the container(3 pieces),
        //then the screen flashes with more intensity

        DoFlashOverlay(1f, intensity);
    }
 public override void OnSpawn()
 {
     base.OnSpawn();
     Invoke("CleanProjectile", fLifeSpan);       //Clean from scene after delay
     if (owner == Owner.PLAYER_UNIT)
     {
         SpringArm.GetInstance().DoShakeCamera(0.1f, 0.1f);
     }
     moveDir = transform.forward; //default value if we fail to set it in the weapon
 }