public LaserBullet(Transform Trans, LaserBulletDescriptor Desc) : base(Trans, BulletType.Laser, Desc.BaseBulletDesc) { LineCaller_ = new LineCaller(Trans.GetComponent <LineRenderer>()); BeginAngle_ = Desc.BeginAngle; EndAngle_ = Desc.EndAngle; StepAngle_ = Desc.StepAngle; Radius_ = Desc.Radius; Shape_ = new FanShape(Radius_, BeginAngle_, BeginAngle_); }
public override void CreateDebugLine() { ObjOuter_ = AssetManager.CreatePrefabSync(new AssetUri("prefabs/line.prefab")).transform; ObjOuter_.name = $"NpcRectOuter<{ID}>"; MapManager.AddToGroundLayer(ObjOuter_); ObjOuter_.localPosition = Vector3.zero; CallerOuter_ = new LineCaller(ObjOuter_.GetComponent <LineRenderer>()); CallerOuter_.DrawRect( new LineCallerPoint(Position + OffsetAttr.Min, Color.blue), new LineCallerPoint(Position + OffsetAttr.Max, Color.blue)); }
public override void CreateDebugLine() { ObjInner_ = AssetManager.CreatePrefabSync(new AssetUri("prefabs/line.prefab")).transform; ObjInner_.name = $"NpcNormalInner<{ID}>"; MapManager.AddToGroundLayer(ObjInner_); ObjInner_.localPosition = Vector3.zero; CallerInner_ = new LineCaller(ObjInner_.GetComponent <LineRenderer>()); CallerInner_.DrawCircle(new LineCallerPoint(Position, Color.red), RadiusAttr.Min); ObjOuter_ = AssetManager.CreatePrefabSync(new AssetUri("prefabs/line.prefab")).transform; ObjOuter_.name = $"NpcNormalOuter<{ID}>"; MapManager.AddToGroundLayer(ObjOuter_); ObjOuter_.localPosition = Vector3.zero; CallerOuter_ = new LineCaller(ObjOuter_.GetComponent <LineRenderer>()); CallerOuter_.DrawCircle(new LineCallerPoint(Position, Color.blue), RadiusAttr.Max); }