Ejemplo n.º 1
0
    public void ThrowWad()
    {
        Wad wad = EntityFactory.Instance.Create <Wad>();

        wad.FacingRight = true;
        wad.GetComponent <Rigidbody2D>().MovePosition(transform.position);
        wad.gameObject.layer = LayerMask.NameToLayer(COLLECT_LAYER);

        TrajectoryModData throwTrajectory = new TrajectoryModData(GetImpactFromGradient(), GetAngularImpactFromGradient(), trajectory);

        wad.Impact(throwTrajectory);

        NumWadsSpawned++;
    }