コード例 #1
0
    // Update is called once per frame
    public void Update()
    {
        if (AvatarState == E_AvatarState.AS_DEAD)
        {
            return;
        }

        //if (_childObj.eulerAngles.x > 0 || _childObj.eulerAngles.z > 0)
        //{
        //    //补充功能:如果掉落,需要重新拉回
        //    _childObj.eulerAngles = new Vector3(0, _childObj.eulerAngles.y, 0);
        //  //  _ufpTransformChildObj.rotation = FPQuaternion.Eule(0, _ufpTransformChildObj.eulerAngles.y, 0);
        //}
        RaycastHit info;

        if (PixelManager.GetInstance() != null && _characterMotionObj.RayGroundInfo(out info) &&
            (AvatarMotion == E_AvatarMotionState.AM_IDLE))
        {
            PixelManager.E_InColorType type = PixelManager.GetInstance().GetPixelsInfo(AvatarEntityId, info.textureCoord);
            AcquireRestoreEnergySpeed(type);

            //2)处于敌方颜料中血量的减少
            if (type == PixelManager.E_InColorType.IC_OTHER_COLOR)
            {
                Hp--;
            }
        }

        //  Debug.Log("Hp::::" + Hp);
    }
コード例 #2
0
    public bool AcquireInkColorType(out PixelManager.E_InColorType ColorType)
    {
        RaycastHit info;

        if (!_characterMotionObj.OnGrouldRayInfoAndRender(out info))
        {
            ColorType = PixelManager.E_InColorType.IC_BLANK_COLOR;
            return(false);
        }
        ColorType = PixelManager.GetInstance().GetPixelsInfo(AvatarEntityId, info.textureCoord);
        return(true);
    }
コード例 #3
0
    public bool AcquireInkColorType(out PixelManager.E_InColorType ColorType, out bool Slope)
    {
        RaycastHit info;

        if (!_characterMotionObj.OnGrouldRayInfoAndRender(out info))
        {
            Slope     = false;
            ColorType = PixelManager.E_InColorType.IC_BLANK_COLOR;
            return(false);
        }
        ColorType = PixelManager.GetInstance().GetPixelsInfo(AvatarEntityId, info.textureCoord);
        Slope     = (Vector3.Angle(Vector3.up, info.normal) > _characterMotionObj.SlopeAngle) ? true : false;
        return(true);
    }
コード例 #4
0
 /// <summary>
 /// 获取恢复弹药的速度
 /// </summary>
 /// <param name="type"></param>
 void AcquireRestoreEnergySpeed(PixelManager.E_InColorType type)
 {
     RestoreEnergySpeed = JudgetRestoreBulletSpeed((type == PixelManager.E_InColorType.IC_SELF_COLOR &&
                                                    AvatarForm == E_AvatarForm.INKFISHDIVE_STATE) ? true : false);
 }