コード例 #1
0
ファイル: CItemGlobal.cs プロジェクト: puos/EAProjectV2
 public EA_ItemAttackWeaponInfo()
 {
     weaponType               = eWeaponType.eWT_Unarmed;
     fKillDistance            = 50.0f;
     fFiringTime              = 0;
     uProjectileModelType     = "";
     m_objProjectileClassType = default(Type);
     fProjectileSpeed         = 0;
     bAutoMode                = true;
     projectileType           = eProjectileType.ePT_General;
     m_fTargetDistance        = 0;
     bForceMode               = false;
     m_TargetActorId          = CObjGlobal.InvalidObjID;
     m_strTargetActorBoneName = null;
     projectileRadius         = 0.0f;
     onExplosionEvent         = null;
 }
コード例 #2
0
ファイル: CItemGlobal.cs プロジェクト: puos/EAProjectV2
 public void Copy(EA_ItemAttackWeaponInfo obj)
 {
     id                       = obj.id;
     weaponType               = obj.weaponType;
     fKillDistance            = obj.fKillDistance;
     fFiringTime              = obj.fFiringTime;
     uProjectileModelType     = obj.uProjectileModelType;
     m_objProjectileClassType = obj.m_objProjectileClassType;
     fProjectileSpeed         = obj.fProjectileSpeed;
     bAutoMode                = obj.bAutoMode;
     projectileType           = obj.projectileType;
     m_fTargetDistance        = obj.m_fTargetDistance;
     bForceMode               = obj.bForceMode;
     m_TargetActorId          = obj.m_TargetActorId;
     m_strTargetActorBoneName = obj.m_strTargetActorBoneName;
     projectileRadius         = obj.projectileRadius;
     onExplosionEvent         = obj.onExplosionEvent;
 }
コード例 #3
0
    public void Setup(SkillTables.ProjectTileInfo _projecttile, AbilityData _ability, int _Damage, int _teamIndex, Vector3 _dir, Unit _owner, Unit _target, ulong _projectTileId, bool _normal = false)
    {
        Reset();

        //< 레이어 설정
        if (_owner != null)
        {
            this.gameObject.layer = _owner.gameObject.layer;
        }

        //< 정보 대입
        projectileInfo = _projecttile;
        ProjectTileId  = _projectTileId;
        damage         = _Damage;
        dir            = _dir;
        Owner          = _owner;
        TargetUnit     = _target;
        normal         = _normal;
        penetrateCount = projectileInfo.penetrateCount;
        abilityData    = _ability;

        ////< 시뮬레이션 상태일때는 에러 뱉어줌
        //if (SimulationGameInfo.SimulationGameCheck)
        //{
        //    if (projectileInfo.penetrate == 1 && penetrateCount == 1)
        //        UIMgr.instance.OpenToastPanel("[Error] penetrate == 1 && penetrateCount == 1");
        //}

        //< 타입 설정
        ProjectileType = TargetUnit != null ? eProjectileType.OneTarget : eProjectileType.NonTarget;

        //< 타겟이 있을시 오프셋위치를 잡는다
        if (TargetUnit != null)
        {
            BoxCollider collide = TargetUnit.GetComponent <BoxCollider>();
            float       height  = (collide != null ? (collide.bounds.max.y / 2) : 1);

            if (height < 0)
            {
                height *= -1;
            }

            //OffsetPos = height;
        }

        //< 적 리스트를 얻어온다.
        SetTargetList();

        //< 모델 생성
        CreateModel();

        //즉시 날라가는 스킬의 경우만
        if (projectileInfo.Type == 0)
        {
            //< 이동속도가 0이라면, 상대에게 바로 이동시켜준다
            if (ProjectileType == eProjectileType.OneTarget && projectileInfo.moveSpeed == 0 && _target != null)
            {
                this.transform.position = _target.transform.position;
            }
        }
        else if (_projecttile.Type == 1)
        {
            DestroyTime    = Time.time + projectileInfo.durationTime;
            NextDamageTime = projectileInfo.damageinterval;
        }
    }