public void CopyFrom(WeaponParam other)
 {
     if (other == null)
     {
         return;
     }
     Update(other.radius);
 }
 public WeaponParam( WeaponParam _src )
 {
     m_ComponentName = _src.m_ComponentName ;
     m_Angle = _src.m_Angle ;
     m_Range = _src.m_Range ;
     m_Accuracy = _src.m_Accuracy ;
     m_FireAudioName = _src.m_FireAudioName ;
 }
Beispiel #3
0
 public void CopyFrom(WeaponParam other)
 {
     if (other == null)
     {
         return;
     }
     Update(other.radius, other.stiffnessForce, other.dragForce, other.threshold, other.hasChestCollider, other.hasWaistCollider, other.colliders);
 }
Beispiel #4
0
 public void CopyFrom(WeaponParam other)
 {
     if (other == null)
     {
         return;
     }
     Update(other.dynamicRatio, other.windStrength);
 }
    public WeaponParam GetWeaponParam(int weaponID, bool create = false)
    {
        var param = m_weaponParams.Find(p => p.weaponID == weaponID);

        if (create && param == null)
        {
            param = new WeaponParam(weaponID, radius);
            m_weaponParams.Add(param);
        }

        return(param);
    }
Beispiel #6
0
    public WeaponParam GetWeaponParam(int weaponID, bool create = false)
    {
        var param = m_weaponParams.Find(p => p.weaponID == weaponID);

        if (create && param == null)
        {
            param = new WeaponParam(weaponID, radius, stiffnessForce, dragForce, threshold, false, false, colliders);
            m_weaponParams.Add(param);
        }

        return(param);
    }
Beispiel #7
0
    public WeaponParam GetWeaponParam(int weaponID, bool create = false)
    {
        var param = m_weaponParams.Find(p => p.weaponID == weaponID);

        if (create && param == null)
        {
            param = new WeaponParam(weaponID, dynamicRatio, windStrength);
            m_weaponParams.Add(param);
        }

        return(param);
    }
    public static bool Parse( /*in*/ XmlNode _WeaponParamNode ,
							  out WeaponParam _Result )
    {
        _Result = new WeaponParam() ;
        if( null == _WeaponParamNode )
            return false ;

        if( null != _WeaponParamNode.Attributes[ "componentName" ] )
            _Result.m_ComponentName = _WeaponParamNode.Attributes[ "componentName" ].Value ;

        if( null != _WeaponParamNode.Attributes[ "angle" ] )
        {
            float tmp = 0.0f ;
            float.TryParse( _WeaponParamNode.Attributes[ "angle" ].Value  , out tmp ) ;
            _Result.m_Angle = tmp ;
        }

        if( null != _WeaponParamNode.Attributes[ "range" ] )
        {
            float tmp = 0.0f ;
            float.TryParse( _WeaponParamNode.Attributes[ "range" ].Value , out tmp ) ;
            _Result.m_Range = tmp ;
        }

        if( null != _WeaponParamNode.Attributes[ "accuracy" ] )
        {
            float accuracy = 0.0f ;
            float.TryParse( _WeaponParamNode.Attributes[ "accuracy" ].Value , out accuracy ) ;
            _Result.m_Accuracy = accuracy ;
        }

        if( null != _WeaponParamNode.Attributes[ "fireAudioName" ] )
            _Result.m_FireAudioName = _WeaponParamNode.Attributes[ "fireAudioName" ].Value ;

        return ( 0 != _Result.m_ComponentName.Length ) ;
    }
    public UnitComponentData( UnitComponentData _src )
    {
        this.m_Name = _src.m_Name ;
        this.m_HP = new StandardParameter( _src.m_HP ) ;
        this.m_Energy = new StandardParameter( _src.m_Energy ) ;
        this.m_Generation = new StandardParameter( _src.m_Generation ) ;
        this.m_Effect = new StandardParameter( _src.m_Effect ) ;

        this.m_Status = _src.m_Status ;
        this.m_StatusDescription = new StatusDescription( _src.m_StatusDescription ) ;
        this.m_Effect_HP_Curve = new InterpolateTable( _src.m_Effect_HP_Curve ) ;

        this.m_ReloadEnergy = new StandardParameter( _src.m_ReloadEnergy ) ;
        this.m_ReloadGeneration = new StandardParameter( _src.m_ReloadGeneration ) ;
        this.m_WeaponReloadStatus = _src.m_WeaponReloadStatus ;

        this.m_ComponentParam = new ComponentParam( _src.m_ComponentParam ) ;
        this.m_WeaponParam = new WeaponParam( _src.m_WeaponParam ) ;
    }
Beispiel #10
0
 /// <summary>
 /// Bullets the create.
 /// </summary>
 /// <param name="pParam">P parameter.</param>
 /// <param name="pTransform">P transform.</param>
 protected override void WeaponParamCreate(WeaponParam pParam, Transform pTransform = null)
 {
     base.WeaponParamCreate (pParam, _gunTips);
     pParam.interval 		= 4f;
     pParam.bulletsSpeed  	= 100f;
     pParam.minPlayTime 		= 10f;
     pParam.maxPlayTime 		= 20f;
     pParam.m_type 			= SHOOTER_TYPE.CREW;
 }
 private GameObject _CreateBullets(WeaponParam pParams, Quaternion que)
 {
     GameObject _obj = (GameObject)Instantiate(pParams.Bullet, pParams.bulletsOffset, que);
     _obj.transform.SetParent(BaseTransform);
     return _obj;
 }
Beispiel #12
0
 /// <summary>
 /// Bullets the create.
 /// </summary>
 protected virtual void WeaponParamCreate(WeaponParam pParam, Transform pTransform = null)
 {
     if (pTransform != null) {
         pParam.bulletsOffset 	= pTransform.position + characterBulletsOffset.RevisionTurn(flip);
         pParam.attack			= attack;
     }
 }