示例#1
0
    // 런쳐 볼 세팅
    public void LaunchBall(Vector3 accVel)
    {
        LaunchInit = true;
        _ball.LaunchBall(accVel, GlobalUtil.NoContect);
        _property = BALL_PROPERTY.LAUNCH;

        _ball.Rigid.AddTorque(new Vector3(10, 10, 10), ForceMode.VelocityChange);
    }
示例#2
0
 public void ChangeNomalBall()
 {
     // 내 클라이언트 마구 ->  노멀 볼로 돌리기
     if (_property.Equals(BALL_PROPERTY.ACTIVE))
     {
         _property = BALL_PROPERTY.NORMAL;
         CompIndex = 1000001;
     }
 }
示例#3
0
    // 볼 던지기
    public void RemoteShootBall(Vector3 pos, Vector3 direct, float maxPain, float pain, SportManBase target)
    {
        gameObject.SetActive(true);
        _ball.RemoteShootBall(pos, direct, maxPain, pain, _levelpain, target);
        _ball.CurrentState = BALL_STAT.REMOTESHOOT;
        _own = false;

        if (_property.Equals(BALL_PROPERTY.NORMAL) == false)
        {
            _property = BALL_PROPERTY.ACTIVE;
        }
    }
示例#4
0
    //  네트워크 리시트 볼 던지기
    public void ShootBall(Vector3 pos, Vector3 direct, int layer, float maxPain, float pain, SportManBase target)
    {
        //Debug.LogFormat("Shoot Ball UID : {0}" , UID);

        //_ball.ShootBall(pos, direct, GlobalUtil.MyAttackBall, maxPain, pain,_levelpain, target);
        _ball.ShootBall(pos, direct, layer, maxPain, pain, _levelpain, target);
        _own = false;

        if (_property.Equals(BALL_PROPERTY.NORMAL) == false)
        {
            _property = BALL_PROPERTY.ACTIVE;
        }
    }
示例#5
0
    void OnCollisionStay(Collision collision)
    {
        if (_own && collision.relativeVelocity.sqrMagnitude < 0.2f)
        {
            if (_ball != null)
            {
                _ball.OnCollisionStay(collision);
            }

            _own = false;

            // 내 클라이언트 마구 ->  노멀 볼로 돌리기
            if (_property.Equals(BALL_PROPERTY.ACTIVE))
            {
                _property = BALL_PROPERTY.NORMAL;
                CompIndex = 1000001;
            }
        }
    }