Пример #1
0
    protected override void Attack()
    {
        Vector3 upabit = Vector3.up;

        this.transform.TransformDirection(upabit);
        upabit = upabit.normalized * heightoffset;

        GameObject projectileinstance  = Instantiate(projectile, this.transform.position + upabit, this.transform.rotation) as GameObject;
        AbstractReturnableProjectile b = projectileinstance.GetComponent <AbstractReturnableProjectile> ();

        b.setTrackDelaysAndStart(new float[] { beatsToHit });
        b.setSource(this.gameObject);
        soundpicker.PlayNext();
    }
 public ReturnableSphericalDamageEvent(int val, float radius, Vector3 loc, AbstractReturnableProjectile projectile) : base(val, loc)
 {
     this.radius     = radius;
     this.projectile = projectile;
 }
 public ReturnableSphericalDamageEvent(int val, float radius, Vector3 loc, AbstractReturnableProjectile projectile)
     : base(val, loc)
 {
     this.radius = radius;
     this.projectile = projectile;
 }