예제 #1
0
 public void fireProjectile(UnitComponent.EventArgsFireProjectile args)
 {
     foreach (ProjectileComponent pc in projectiles)
     {
         ProjectileComponent newProjectile = (ProjectileComponent)Instantiate(pc, transform.position, transform.rotation);
         newProjectile.FireProjectile(args);
     }
 }
예제 #2
0
    public void FireProjectile(UnitComponent.EventArgsFireProjectile args)
    {
        startTime     = Time.time;
        impactTime    = args.impactTime;
        target        = args.targetObject;
        startPos      = gameObject.transform.position;
        startRotation = transform.rotation;        //Quaternion.LookRotation(target.position);
        StartCoroutine(TimeOut());

        AudioEngine.instance.PlayWeaponFire(audioConfig);
        Instantiate(mussleFlash, this.transform.position, Quaternion.identity);
    }