Ejemplo n.º 1
0
    private void KickBall(Vector3 p_direction, float p_force)
    {
        Debug.Log(p_direction * p_force);
        shootAI._ball.velocity = p_direction * p_force;

        if (Shoot.EventShoot != null)
        {
            Shoot.EventShoot();
        }
    }
Ejemplo n.º 2
0
    public void KickBall(Vector3 p_direction, float p_force)
    {
        if (this.footballMain != null && this.footballMain.gameState == FootballMain.GameState.InGame)
        {
            shootAI._ball.velocity += p_direction * force;
            if (p_force < 1)
            {
                //shootAI._ball.velocity *= 1.2f;
            }

            if (Shoot.EventShoot != null)
            {
                Shoot.EventShoot();
            }
            recordBallFlightTime = Time.time + maxBallFlightTime;

            AudioManager.instance.PlayAudio(this.gameObject, EventFlag.Audio.KickBall, 0.8f);
        }
    }