public void InitFromShooter(Actor inShooter) { SetPlayerId((int)inShooter.GetPlayerId()); Vector3 forward = inShooter.GetForwardVector(); SetVelocity(inShooter.mDirection + forward * mMuzzleSpeed); SetLocation(inShooter.GetLocation()); mDirection = inShooter.GetRotation(); mStartLocation = inShooter.GetLocation(); LogHelper.LogInfo($"start x{mStartLocation.x}, y{mStartLocation.y}, z{mStartLocation.z}"); }
public void InitFrom(Actor inShooter, JSkillData skillData) { mDamage = inShooter.GetDamage(skillData.skillId, GameObjectClassId.Actor); mSiegeAtk = inShooter.GetDamage(skillData.skillId, GameObjectClassId.Prop); inShooter.LastBombNetworkId = GetNetworkId(); LogHelper.LogInfo($"create enter {GetNetworkId()}, {inShooter.LastBombNetworkId}, skill_id:{skillData.skillId}, explosionID:{skillData.explosionID}"); SetPlayerId(inShooter.GetPlayerId()); mParentNetworkId = inShooter.GetNetworkId(); Vector3 loc = inShooter.GetLocation(); loc.y = inShooter.floor; SetLocation(loc); mDirection = inShooter.GetRotation(); JExplosionData a_kExplosionData = ACDC.ExplosionData[skillData.explosionID]; mExplodeTime = Timing.sInstance.GetFrameStartTime() + a_kExplosionData.time; mSkillId = skillData.skillId; var player = World.Instance(WorldId).GameMode.GetEntry(inShooter.GetPlayerId()); if (player != null) { mTeam = (byte)player.GetTeam(); } }
public override bool HandleCollisionWithActor(Actor inActor) { //점프대, 텔레포트 유니티 물리 충돌에서 체크 하게 변경. //if ((MapData.mapTypes & (1 << (int)MapPropertyType.Jump)) != 0 // || (MapData.mapTypes & (1 << (int)MapPropertyType.WarpZone)) != 0 // ) //{ // inActor.TryTeleport(MapData.jumpLandingPos, MapData.jumpPower, MapData.jumpDuration, MapData.uID); //} if ((MapData.mapTypes & (1 << (int)MapPropertyType.IceFloor)) != 0 && inActor.IsIce == false) { inActor.IsIce = true; } if ((MapData.mapTypes & (1 << (int)MapPropertyType.SlowFloor)) != 0 && inActor.IsSlow == false) { inActor.tileSpeed = MapData.tileSpeed; Vector3 slowVelocity = inActor.GetVelocity() * MapData.tileSpeed; //LogHelper.LogInfo($"slow floor last velocity{inActor.GetVelocity()}, location{inActor.GetLocation()}, slow {slowVelocity}"); inActor.SetVelocity(inActor.GetVelocity() + slowVelocity); inActor.SetLocation(inActor.GetLocation() + slowVelocity); //LogHelper.LogInfo($"slow floor current velocity{inActor.GetVelocity()}, location{inActor.GetLocation()}"); inActor.IsSlow = true; } return(IsCollision); }
public void InitFrom(Actor inShooter) { SetColor(inShooter.GetColor()); SetPlayerId((int)inShooter.GetPlayerId()); mParentNetworkId = inShooter.GetNetworkId(); SetLocation(inShooter.GetLocation().Round()); mDirection = inShooter.GetRotation(); }
public void InitFromShooter(Actor inShooter) { SetColor(inShooter.GetColor()); SetPlayerId((int)inShooter.GetPlayerId()); Vector3 forward = inShooter.GetForwardVector(); SetVelocity(inShooter.GetVelocity() + forward * mMuzzleSpeed); SetLocation(inShooter.GetLocation()); mDirection = inShooter.GetRotation(); }